Inheritance diagram for ilSaxParser:
Collaboration diagram for ilSaxParser:Public Member Functions | |
| ilSaxParser ($a_xml_file) | |
| Constructor setup ILIAS global object public. | |
| startParsing () | |
| stores xml data in array | |
| createParser () | |
| create parser | |
| setOptions ($a_xml_parser) | |
| set parser options | |
| setHandlers ($a_xml_parser) | |
| set event handler should be overwritten by inherited class private | |
| openXMLFile () | |
| open xml file | |
| parse ($a_xml_parser, $a_fp) | |
| parse xml file | |
| freeParser ($a_xml_parser) | |
| free xml parser handle | |
Data Fields | |
| $ilias | |
| $lng | |
| $xml_file | |
Definition at line 36 of file class.ilSaxParser.php.
| ilSaxParser::createParser | ( | ) |
create parser
private
Definition at line 93 of file class.ilSaxParser.php.
Referenced by startParsing().
{
$xml_parser = xml_parser_create("UTF-8");
if($xml_parser == false)
{
$this->ilias->raiseError("Cannot create an XML parser handle",$this->ilias->error_obj->FATAL);
}
return $xml_parser;
}
Here is the caller graph for this function:| ilSaxParser::freeParser | ( | $ | a_xml_parser | ) |
free xml parser handle
private
Definition at line 155 of file class.ilSaxParser.php.
Referenced by startParsing().
{
if(!xml_parser_free($a_xml_parser))
{
$this->ilias->raiseError("Error freeing xml parser handle ",$this->ilias->error_obj->FATAL);
}
}
Here is the caller graph for this function:| ilSaxParser::ilSaxParser | ( | $ | a_xml_file | ) |
Constructor setup ILIAS global object public.
Definition at line 64 of file class.ilSaxParser.php.
Referenced by ilCategoryImportParser::ilCategoryImportParser(), ilContObjParser::ilContObjParser(), ilForumImportParser::ilForumImportParser(), ilGroupImportParser::ilGroupImportParser(), ilMailImportParser::ilMailImportParser(), ilObjectDefinition::ilObjectDefinition(), ilSCORMPackageParser::ilSCORMPackageParser(), ilStyleDefinition::ilStyleDefinition(), ilStyleImportParser::ilStyleImportParser(), and ilUserImportParser::ilUserImportParser().
Here is the caller graph for this function:| ilSaxParser::openXMLFile | ( | ) |
open xml file
private
Definition at line 125 of file class.ilSaxParser.php.
Referenced by startParsing().
{
if(!($fp = fopen($this->xml_file,'r')))
{
$this->ilias->raiseError("Cannot open xml file",$this->ilias->error_obj->FATAL);
}
return $fp;
}
Here is the caller graph for this function:| ilSaxParser::parse | ( | $ | a_xml_parser, | |
| $ | a_fp | |||
| ) |
parse xml file
private
Definition at line 138 of file class.ilSaxParser.php.
References $data.
Referenced by startParsing().
{
while($data = fread($a_fp,4096))
{
$parseOk = xml_parse($a_xml_parser,$data,feof($a_fp));
if(!$parseOk
&& (xml_get_error_code($a_xml_parser) != XML_ERROR_NONE))
{
$this->ilias->raiseError("XML Parse Error: ",$this->ilias->error_obj->FATAL);
}
}
}
Here is the caller graph for this function:| ilSaxParser::setHandlers | ( | $ | a_xml_parser | ) |
set event handler should be overwritten by inherited class private
Reimplemented in ilCategoryImportParser, ilForumImportParser, ilGroupImportParser, ilMailImportParser, ilObjectDefinition, ilStyleDefinition, ilStyleImportParser, ilUserImportParser, ilContObjParser, and ilSCORMPackageParser.
Definition at line 117 of file class.ilSaxParser.php.
Referenced by startParsing().
{
}
Here is the caller graph for this function:| ilSaxParser::setOptions | ( | $ | a_xml_parser | ) |
set parser options
private
Definition at line 108 of file class.ilSaxParser.php.
Referenced by startParsing().
{
xml_parser_set_option($a_xml_parser,XML_OPTION_CASE_FOLDING,false);
}
Here is the caller graph for this function:| ilSaxParser::startParsing | ( | ) |
stores xml data in array
private
Reimplemented in ilCategoryImportParser, ilForumImportParser, ilGroupImportParser, ilMailImportParser, ilStyleImportParser, ilUserImportParser, ilContObjParser, and ilSCORMPackageParser.
Definition at line 79 of file class.ilSaxParser.php.
References createParser(), freeParser(), openXMLFile(), parse(), setHandlers(), and setOptions().
{
$xml_parser = $this->createParser();
$this->setOptions($xml_parser);
$this->setHandlers($xml_parser);
$fp = $this->openXMLFile();
$this->parse($xml_parser,$fp);
$this->freeParser($xml_parser);
}
Here is the call graph for this function:| ilSaxParser::$ilias |
Definition at line 43 of file class.ilSaxParser.php.
Referenced by ilGroupImportParser::__assignMembers(), ilStyleDefinition::getAllTemplates(), ilUserImportParser::handlerEndTag(), ilCategoryImportParser::handlerEndTag(), ilSaxParser(), and ilStyleDefinition::ilStyleDefinition().
| ilSaxParser::$lng |
Reimplemented in ilContObjParser.
Definition at line 50 of file class.ilSaxParser.php.
Referenced by ilSaxParser(), ilStyleImportParser::ilStyleImportParser(), and ilUserImportParser::ilUserImportParser().
| ilSaxParser::$xml_file |
Definition at line 57 of file class.ilSaxParser.php.
1.7.1