4 include_once(
"./Services/Xml/classes/class.ilSaxParser.php");
33 function __construct($a_top_entity, $a_schema_version, $a_xml, $a_ds, $a_mapping)
36 $this->mapping = $a_mapping;
37 $this->top_entity = $a_top_entity;
38 $this->schema_version = $a_schema_version;
39 $this->dspref = ($this->ds->getDSPrefix() !=
"")
40 ? $this->ds->getDSPrefix().
":" 43 parent::__construct();
70 xml_set_object($a_xml_parser,$this);
71 xml_set_element_handler($a_xml_parser,
'handleBeginTag',
'handleEndTag');
72 xml_set_character_data_handler($a_xml_parser,
'handleCharacterData');
81 parent::startParsing();
91 case $this->dspref.
"DataSet":
93 $this->current_installation_id = $a_attribs[
"InstallationId"];
94 $this->ds->setCurrentInstallationId($a_attribs[
"InstallationId"]);
97 case $this->dspref.
"Types":
98 $this->current_entity = $a_attribs[
"Entity"];
99 $this->current_version = $a_attribs[
"Version"];
102 case $this->dspref.
"FieldType":
103 $this->current_ftypes[$a_attribs[
"Name"]] =
107 case $this->dspref.
"Rec":
108 $this->current_entity = $a_attribs[
"Entity"];
109 $this->in_record =
true;
110 $this->current_field_values =
array();
114 if ($this->in_record)
116 $field = explode(
":", $a_name);
117 $field = $field[count($field) - 1];
118 $this->current_field = $field;
130 case $this->dspref.
"Types":
133 "version" => $this->current_version,
134 "types" => $this->current_ftypes
136 $this->current_ftypes =
array();
137 $this->current_entity =
"";
138 $this->current_version =
"";
141 case $this->dspref.
"Rec":
142 $this->ds->importRecord($this->current_entity,
143 $this->entities[$this->current_entity][
"types"],
144 $this->current_field_values,
146 $this->schema_version);
147 $this->in_record =
false;
148 $this->current_entity =
"";
149 $this->current_field_values =
array();
153 if ($this->in_record && $this->current_field !=
"")
158 $this->current_field =
"";
162 $this->chr_data =
"";
176 $this->chr_data .= $a_data;
handleBeginTag($a_xml_parser, $a_name, $a_attribs)
Begin Tag.
startParsing()
Start parser.
Manifest parser for ILIAS standard export files.
Base class for sax-based expat parsing extended classes need to overwrite the method setHandlers and ...
getCurrentInstallationId()
Get current installation id.
__construct($a_top_entity, $a_schema_version, $a_xml, $a_ds, $a_mapping)
Constructor.
Create styles array
The data for the language used.
handleCharacterData($a_xml_parser, $a_data)
End Tag.
handleEndTag($a_xml_parser, $a_name)
End Tag.
setHandlers($a_xml_parser)
Set event handlers.
setXMLContent($a_xml_content)