24 require_once(
"./Services/Xml/classes/class.ilSaxParser.php");
 
   58                 $this->has_error = FALSE;
 
   68                 xml_set_object($a_xml_parser,$this);
 
   69                 xml_set_element_handler($a_xml_parser,
'handlerBeginTag',
'handlerEndTag');
 
   70                 xml_set_character_data_handler($a_xml_parser,
'handlerCharacterData');
 
   86         function parse($a_xml_parser,$a_fp = null)
 
   92                                 while($data = fread($a_fp,4096))
 
   94                                         $parseOk = xml_parse($a_xml_parser,$data,feof($a_fp));
 
  103                    && (xml_get_error_code($a_xml_parser) != XML_ERROR_NONE))
 
  105       $this->error_code = xml_get_error_code($a_xml_parser);
 
  106       $this->error_line = xml_get_current_line_number($a_xml_parser);
 
  107       $this->error_col = xml_get_current_column_number($a_xml_parser);
 
  108       $this->error_msg = xml_error_string($a_xml_parser);
 
  109                         $this->has_error = TRUE;
 
  121     $this->attributes+=count($a_attribs);
 
  137     $this->text_size+=strlen($a_data);
 
  162     return "Error: ".$this->error_msg.
" at line:".$this->error_line .
" column:".
$this->error_col;