2 namespace TYPO3\CMS\Extensionmanager\Utility\Parser;
33 $this->requiredPhpExtensions =
'xmlreader';
43 $this->objXml = new \XMLReader();
56 if (!(is_object($this->objXml) && get_class($this->objXml) ==
'XMLReader')) {
57 throw new \TYPO3\CMS\Extensionmanager\Exception\ExtensionManagerException(
'Unable to create XML parser.', 1342640820);
59 if ($this->objXml->open($file,
'utf-8') ===
false) {
60 throw new \TYPO3\CMS\Extensionmanager\Exception\ExtensionManagerException(sprintf(
'Unable to open file resource %s.', $file), 1342640893);
62 while ($this->objXml->read()) {
63 if ($this->objXml->nodeType == \XMLReader::ELEMENT) {
66 if ($this->objXml->nodeType == \XMLReader::END_ELEMENT) {
73 $this->objXml->close();
85 switch ($elementName) {
121 switch ($elementName) {
144 if (!$this->objXml->isEmptyElement) {
146 while ($this->objXml->read()) {
147 if ($this->objXml->nodeType == \XMLReader::TEXT || $this->objXml->nodeType == \XMLReader::CDATA || $this->objXml->nodeType == \XMLReader::WHITESPACE || $this->objXml->nodeType == \XMLReader::SIGNIFICANT_WHITESPACE) {
148 $value .= $this->objXml->value;
150 if ($this->objXml->nodeType == \XMLReader::END_ELEMENT && $this->objXml->name === $elementName) {