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');
51 $this->inMetaDataTag =
true;
55 if ($this->inMetaDataTag) {
56 $this->inMdGeneralTag =
true;
61 if ($this->inMetaDataTag && $this->inMdGeneralTag) {
67 $this->inSettingsTag =
true;
70 case 'ShowTaxonomies':
73 if ($this->inSettingsTag) {
84 $this->inMetaDataTag =
false;
88 if ($this->inMetaDataTag) {
89 $this->inMdGeneralTag =
false;
94 if ($this->inMetaDataTag && $this->inMdGeneralTag && !$this->descriptionProcessed) {
95 $this->poolOBJ->setDescription($this->cdata);
96 $this->descriptionProcessed =
true;
102 $this->inSettingsTag =
false;
105 case 'ShowTaxonomies':
106 $this->poolOBJ->setShowTaxonomies((
bool) $this->cdata);
111 $this->poolOBJ->setNavTaxonomyId((
int) $this->cdata);
116 $this->poolOBJ->setSkillServiceEnabled((
bool) $this->cdata);
124 if ($charData !=
"\n") {
126 $charData = preg_replace(
"/\t+/",
" ", $charData);
128 $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)