title: SAX-based parser not seeking content
body: <p>I am trying to implement a SAX based parser but somehow it only recognizes the start of the element and the end, the content is not provided in the logs. The variable holding the XML is filled correctly, I checked through a simple log.
  Here is the code:</p>
  
  <pre><code>&lt;?php
      function startElementHandler($parser, $name, $attribs) {
         if($name == "id"){
              $id = TRUE;
          }
      }
  
      function endElementHandler($parser,$name){
          $id = FALSE;
      }
  
      function characterDataHandler($parser,$data){
          if($id == TRUE){
              echo $data;
          }
      }
  
      global $id;
      $id = FALSE;
  
      $parser = xml_parser_create();
      xml_set_element_handler($parser, "startElementHandler","endElementHandler");
      xml_set_character_data_handler($parser,"characterDataHandler");
  
      $xml = file_get_contents("http://itunes.apple.com/de/rss/topfreeapplications/limit=100/xml");
      xml_parse($parser,$xml);
  
      //xml_parser_free($parser);
  ?&gt;
  </code></pre>
  
  <p>Any suggestion how I could recieve the content? Maybe I am missing something strange I am not aware of at the moment. 
  best regards
  tim</p>