original_string: protected function readquestions($text) {
  
          // This converts xml to big nasty data structure,
          // the 0 means keep white space as it is.
          try {
              $xml = xmlize($text, 0, 'UTF-8', true);
          } catch (xml_format_exception $e) {
              $this->error($e->getMessage(), '');
              return false;
          }
  
          $questions = array();
  
          $this->process_category($xml, $questions);
  
          $this->process_tf($xml, $questions);
          $this->process_mc($xml, $questions);
          $this->process_ma($xml, $questions);
          $this->process_fib($xml, $questions);
          $this->process_matching($xml, $questions);
          $this->process_essay($xml, $questions);
  
          return $questions;
      }
code: protected function readquestions($text) {
  
          // This converts xml to big nasty data structure,
          // the 0 means keep white space as it is.
          try {
              $xml = xmlize($text, 0, 'UTF-8', true);
          } catch (xml_format_exception $e) {
              $this->error($e->getMessage(), '');
              return false;
          }
  
          $questions = array();
  
          $this->process_category($xml, $questions);
  
          $this->process_tf($xml, $questions);
          $this->process_mc($xml, $questions);
          $this->process_ma($xml, $questions);
          $this->process_fib($xml, $questions);
          $this->process_matching($xml, $questions);
          $this->process_essay($xml, $questions);
  
          return $questions;
      }
code_tokens: protected function readquestions ( $ text ) { // This converts xml to big nasty data structure, // the 0 means keep white space as it is. try { $ xml = xmlize ( $ text , 0 , 'UTF-8' , true ) ; } catch ( xml_format_exception $ e ) { $ this -> error ( $ e -> getMessage ( ) , '' ) ; return false ; } $ questions = array ( ) ; $ this -> process_category ( $ xml , $ questions ) ; $ this -> process_tf ( $ xml , $ questions ) ; $ this -> process_mc ( $ xml , $ questions ) ; $ this -> process_ma ( $ xml , $ questions ) ; $ this -> process_fib ( $ xml , $ questions ) ; $ this -> process_matching ( $ xml , $ questions ) ; $ this -> process_essay ( $ xml , $ questions ) ; return $ questions ; }
docstring: Parse the xml document into an array of questions
  
  This *could* burn memory - but it won't happen that much
  so fingers crossed!
  
  @param array $text array of lines from the input file.
  @return array (of objects) questions objects.
docstring_tokens: Parse the xml document into an array of questions