34 $this->requiredPhpExtensions =
'xmlreader';
43 $this->objXml = new \XMLReader();
55 if (!(is_object($this->objXml) && get_class($this->objXml) ==
'XMLReader')) {
56 throw new \TYPO3\CMS\Extensionmanager\Exception\ExtensionManagerException(
'Unable to create XML parser.', 1342640820);
58 if ($this->objXml->open($file,
'utf-8') === FALSE) {
59 throw new \TYPO3\CMS\Extensionmanager\Exception\ExtensionManagerException(sprintf(
'Unable to open file resource %s.', htmlspecialchars($file)), 1342640893);
61 while ($this->objXml->read()) {
62 if ($this->objXml->nodeType == \XMLReader::ELEMENT) {
65 if ($this->objXml->nodeType == \XMLReader::END_ELEMENT) {
72 $this->objXml->close();
83 switch ($elementName) {
118 switch ($elementName) {
140 if (!$this->objXml->isEmptyElement) {
142 while ($this->objXml->read()) {
143 if ($this->objXml->nodeType == \XMLReader::TEXT || $this->objXml->nodeType == \XMLReader::CDATA || $this->objXml->nodeType == \XMLReader::WHITESPACE || $this->objXml->nodeType == \XMLReader::SIGNIFICANT_WHITESPACE) {
144 $value .= $this->objXml->value;
146 if ($this->objXml->nodeType == \XMLReader::END_ELEMENT && $this->objXml->name === $elementName) {
getElementValue(&$elementName)
startElement($elementName)