/** * Parse the XML to a node-tree. A so called 'document' * * @param $xmlString (string) The string to turn into a document node. * @return (&array) a node-tree */ function &_xml2Document($xmlString) { $xmlOptions = array(XML_OPTION_CASE_FOLDING => $this->getProperties('caseFolding'), XML_OPTION_SKIP_WHITE => $this->getProperties('skipWhiteSpaces')); $xmlParser = new XPathEngine($xmlOptions); $xmlParser->setVerbose($this->properties['verboseLevel']); // Parse the XML string if (!$xmlParser->importFromString($xmlString)) { $this->_displayError($xmlParser->getLastError(), __LINE__, __FILE__, FALSE); return FALSE; } return $xmlParser->getNode('/'); }