4 include_once(
"./Services/Xml/classes/class.ilSaxParser.php");
5 include_once
"./Services/Xml/classes/class.ilXmlWriter.php";
24 public function __construct($a_file, $a_callback_obj, $a_callback_func)
26 $this->callback_obj = $a_callback_obj;
27 $this->callback_func = $a_callback_func;
29 parent::__construct($a_file,
true);
41 xml_set_object($a_xml_parser, $this);
42 xml_set_element_handler($a_xml_parser,
'handleBeginTag',
'handleEndTag');
43 xml_set_character_data_handler($a_xml_parser,
'handleCharacterData');
51 parent::startParsing();
59 if ($this->in_export_item) {
60 $this->export_item_writer->xmlStartTag($a_name, $a_attribs);
65 $this->entity = $a_attribs[
"Entity"];
66 $this->install_id = $a_attribs[
"InstallationId"];
67 $this->install_url = $a_attribs[
"InstallationUrl"];
68 $this->schema_version = $a_attribs[
"SchemaVersion"];
71 case "exp:ExportItem":
72 $this->in_export_item =
true;
73 $this->current_id = $a_attribs[
"Id"];
78 $this->expfiles[] =
array(
"component" => $a_attribs[
"Component"],
79 "path" => $a_attribs[
"Path"]);
90 case "exp:ExportItem":
91 $this->in_export_item =
false;
92 $cf = $this->callback_func;
93 $this->callback_obj->$cf(
95 $this->schema_version,
97 $this->export_item_writer->xmlDumpMem(
false),
105 if ($this->in_export_item) {
106 $this->export_item_writer->xmlEndTag($a_name);
110 $this->chr_data =
"";
124 $this->chr_data .= $a_data;
126 if ($this->in_export_item) {
127 $this->export_item_writer->xmlData($a_data);
__construct($a_file, $a_callback_obj, $a_callback_func)
Constructor.
handleCharacterData($a_xml_parser, $a_data)
End Tag.
handleEndTag($a_xml_parser, $a_name)
End Tag.
startParsing()
Start parser.
setHandlers($a_xml_parser)
Set event handlers.
handleBeginTag($a_xml_parser, $a_name, $a_attribs)
Begin Tag.
Base class for sax-based expat parsing extended classes need to overwrite the method setHandlers and ...
Create styles array
The data for the language used.