protected function getXPath()
    {
        if (!$this->xpath) {
            $this->xpath = new \DOMXPath($this->getDomElement()->ownerDocument);
            $namespaces = $this->getExtensions()->getNamespaces();
            foreach ($namespaces as $prefix => $namespace) {
                $this->xpath->registerNamespace($prefix, $namespace);
            }
        }

        return $this->xpath;
    }
protected function getXPath()
    {
        if (!$this->xpath) {
            $this->xpath = new \DOMXPath($this->getDomElement()->ownerDocument);
            $namespaces = $this->getExtensions()->getNamespaces();
            foreach ($namespaces as $prefix => $namespace) {
                $this->xpath->registerNamespace($prefix, $namespace);
            }
        }

        return $this->xpath;
    }
protected function getXPath ( ) { if ( ! $ this -> xpath ) { $ this -> xpath = new \ DOMXPath ( $ this -> getDomElement ( ) -> ownerDocument ) ; $ namespaces = $ this -> getExtensions ( ) -> getNamespaces ( ) ; foreach ( $ namespaces as $ prefix => $ namespace ) { $ this -> xpath -> registerNamespace ( $ prefix , $ namespace ) ; } } return $ this -> xpath ; }
Get the XPath query object

@return \DOMXPath

@since 1.0
Get the XPath query object