/**
  * Resets the object so it's able to take a new xml sting/file
  *
  * Constructing objects is slow.  If you can, reuse ones that you have used already
  * by using this reset() function.
  */
 function reset()
 {
     parent::reset();
     $this->properties['modMatch'] = XPATH_QUERYHIT_ALL;
 }
示例#2
0
 /**
  * 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('/');
 }