4 require_once
'Services/Xml/classes/class.ilSaxParser.php';
33 $this->inSettingsTag =
false;
34 $this->inMetaDataTag =
false;
35 $this->inMdGeneralTag =
false;
37 return parent::__construct($xmlFile);
42 xml_set_object($xmlParser,$this);
43 xml_set_element_handler($xmlParser,
'handlerBeginTag',
'handlerEndTag');
44 xml_set_character_data_handler($xmlParser,
'handlerCharacterData');
52 $this->inMetaDataTag =
true;
56 if($this->inMetaDataTag)
58 $this->inMdGeneralTag =
true;
63 if($this->inMetaDataTag && $this->inMdGeneralTag)
70 $this->inSettingsTag =
true;
73 case 'ShowTaxonomies':
76 if($this->inSettingsTag)
89 $this->inMetaDataTag =
false;
93 if($this->inMetaDataTag)
95 $this->inMdGeneralTag =
false;
100 if($this->inMetaDataTag && $this->inMdGeneralTag && !$this->descriptionProcessed)
102 $this->poolOBJ->setDescription($this->cdata);
103 $this->descriptionProcessed =
true;
109 $this->inSettingsTag =
false;
112 case 'ShowTaxonomies':
113 $this->poolOBJ->setShowTaxonomies((
bool)$this->cdata);
118 $this->poolOBJ->setNavTaxonomyId((
int)$this->cdata);
123 $this->poolOBJ->setSkillServiceEnabled((
bool)$this->cdata);
131 if( $charData !=
"\n" )
134 $charData = preg_replace(
"/\t+/",
" ",$charData);
136 $this->cdata .= $charData;
handlerBeginTag($xmlParser, $tagName, $tagAttributes)
handlerEndTag($xmlParser, $tagName)
handlerCharacterData($xmlParser, $charData)
Base class for sax-based expat parsing extended classes need to overwrite the method setHandlers and ...
__construct(ilObjQuestionPool $poolOBJ, $xmlFile)