src/Dom/Document.php
public function getXPath()
    {
      if(!isset($this->xpath))
      {
        $this->xpath = new DOMXPath($this);

        if($this->documentElement->namespaceURI <> '')
          $this->xpath->registerNamespace('default', $this->documentElement->namespaceURI);

        /*foreach ($this->getNamespaces() as $prefix => $namespaceUri)
          $this->xpath->registerNamespace($prefix, $namespaceUri);*/
      }

      return $this->xpath;
    }
public function getXPath()
    {
      if(!isset($this->xpath))
      {
        $this->xpath = new DOMXPath($this);

        if($this->documentElement->namespaceURI <> '')
          $this->xpath->registerNamespace('default', $this->documentElement->namespaceURI);

        /*foreach ($this->getNamespaces() as $prefix => $namespaceUri)
          $this->xpath->registerNamespace($prefix, $namespaceUri);*/
      }

      return $this->xpath;
    }
public function getXPath ( ) { if ( ! isset ( $ this -> xpath ) ) { $ this -> xpath = new DOMXPath ( $ this ) ; if ( $ this -> documentElement -> namespaceURI <> '' ) $ this -> xpath -> registerNamespace ( 'default' , $ this -> documentElement -> namespaceURI ) ; /*foreach ($this->getNamespaces() as $prefix => $namespaceUri)
          $this->xpath->registerNamespace($prefix, $namespaceUri);*/ } return $ this -> xpath ; }
Get DOMXPath for this Document

@return DOMXPath
Get DOMXPath for this Document