61 xml_set_object($a_xml_parser, $this);
62 xml_set_element_handler($a_xml_parser,
'handlerBeginTag',
'handlerEndTag');
63 xml_set_character_data_handler($a_xml_parser,
'handlerCharacterData');
76 $this->default_handler = $a_default_parser;
89 $this->element_handlers[$a_element] = $a_parser;
90 $this->handlers_in_use[$a_element] =
false;
113 if (isset($this->element_handlers[$a_name]) or $this->handler_in_use) {
114 if (!$this->handler_in_use) {
115 $this->handler_in_use = $this->element_handlers[$a_name];
118 $this->current_handler = $this->handler_in_use;
119 return $this->current_handler->handlerBeginTag($a_xml_parser, $a_name, $a_attribs);
122 $this->handler_in_use =
false;
124 return $this->default_handler->handlerBeginTag($a_xml_parser, $a_name, $a_attribs);
135 if (isset($this->element_handlers[$a_name])) {
136 $this->handler_in_use =
false;
137 $this->current_handler = $this->element_handlers[$a_name];
138 return $this->element_handlers[$a_name]->handlerEndTag($a_xml_parser, $a_name);
139 } elseif ($this->handler_in_use) {
140 $this->current_handler = $this->handler_in_use;
141 return $this->current_handler->handlerEndTag($a_xml_parser, $a_name);
143 $this->handler_in_use =
false;
145 return $this->default_handler->handlerEndTag($a_xml_parser, $a_name);
156 return $this->current_handler->handlerCharacterData($a_xml_parser, $a_data);
setHandlers($a_xml_parser)
Set handlers.
setElementHandler(ilSaxSubsetParser $a_parser, $a_element)
Set element handler by element name.
handlerCharacterData($a_xml_parser, $a_data)
handler for character data
handlerEndTag($a_xml_parser, $a_name)
handler for end of element
setDefaultElementHandler(ilSaxSubsetParser $a_default_parser)
Set default element handler.
Create styles array
The data for the language used.
Interface definition for sax subset parsers.
Controller class for sax element handlers.
handlerBeginTag($a_xml_parser, $a_name, $a_attribs)
Set default element handler.
__construct()
Constructor.