/**
  * Constructor of the class
  *
  * Optionally you may call this constructor with the XML-filename to parse and the 
  * XML option vector. A option vector sample: 
  *   $xmlOpt = array(XML_OPTION_CASE_FOLDING => FALSE, XML_OPTION_SKIP_WHITE => TRUE);
  *
  * @param  $userXmlOptions (array)  (optional) Vector of (<optionID>=><value>, <optionID>=><value>, ...)
  * @param  $fileName       (string) (optional) Filename of XML file to load from.
  *                                  It is recommended that you call importFromFile()
  *                                  instead as you will get an error code.  If the
  *                                  import fails, the object will be set to FALSE.
  * @see    parent::XPathEngine()
  */
 function XPath($fileName = '', $userXmlOptions = array())
 {
     parent::XPathEngine($userXmlOptions);
     $this->properties['modMatch'] = XPATH_QUERYHIT_ALL;
     if ($fileName) {
         if (!$this->importFromFile($fileName)) {
             // Re-run the base constructor to "reset" the object.  If the user has any sense, then
             // they will have created the object, and then explicitly called importFromFile(), giving
             // them the chance to catch and handle the error properly.
             parent::XPathEngine($userXmlOptions);
         }
     }
 }
 /**
  * Constructor of the class
  *
  * Optionally you may call this constructor with the XML-filename to parse and the 
  * XML option vector. A option vector sample: 
  *   $xmlOpt = array(XML_OPTION_CASE_FOLDING => FALSE, XML_OPTION_SKIP_WHITE => TRUE);
  *
  * @param  $userXmlOptions (array)  (optional) Vector of (<optionID>=><value>, <optionID>=><value>, ...)
  * @param  $fileName       (string) (optional) Filename of XML file to load from.
  *                                  It is recommended that you call importFromFile()
  *                                  instead as you will get an error code.  If the
  *                                  import fails, the object will be set to FALSE.
  * @see    parent::XPathEngine()
  */
 function XPath($fileName = '', $userXmlOptions = array())
 {
     parent::XPathEngine($userXmlOptions);
     $this->properties['modMatch'] = XPATH_QUERYHIT_ALL;
     if ($fileName) {
         if (!$this->importFromFile($fileName)) {
             $this = FALSE;
         }
     }
 }