4 include_once(
"./classes/class.ilSaxParser.php");
5 include_once
"./Services/Xml/classes/class.ilXmlWriter.php";
24 function __construct($a_file, $a_callback_obj, $a_callback_func)
26 $this->callback_obj = $a_callback_obj;
27 $this->callback_func = $a_callback_func;
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');
60 if ($this->in_export_item)
62 $this->export_item_writer->xmlStartTag($a_name, $a_attribs);
69 $this->entity = $a_attribs[
"Entity"];
70 $this->install_id = $a_attribs[
"InstallationId"];
71 $this->install_url = $a_attribs[
"InstallationUrl"];
72 $this->schema_version = $a_attribs[
"SchemaVersion"];
75 case "exp:ExportItem":
76 $this->in_export_item =
true;
77 $this->current_id = $a_attribs[
"Id"];
82 $this->expfiles[] = array(
"component" => $a_attribs[
"Component"],
83 "path" => $a_attribs[
"Path"]);
95 case "exp:ExportItem":
96 $this->in_export_item =
false;
97 $cf = $this->callback_func;
98 $this->callback_obj->$cf($this->entity, $this->schema_version, $this->current_id,
99 $this->export_item_writer->xmlDumpMem(
false), $this->install_id,
105 if ($this->in_export_item)
107 $this->export_item_writer->xmlEndTag($a_name);
111 $this->chr_data =
"";
125 $this->chr_data .= $a_data;
127 if ($this->in_export_item)
129 $this->export_item_writer->xmlData($a_data);