public function loadXpathFromDoc(\DOMDocument $doc)
    {
        $docName = $doc->documentElement->localName;
        $this->root = '/'.self::ROOT_PREFIX.':'.$docName;
        $this->xpath = new \DOMXPath($doc);
        $this->xpath->registerNamespace(self::ROOT_PREFIX, $doc->documentElement->namespaceURI);
    }
public function loadXpathFromDoc(\DOMDocument $doc)
    {
        $docName = $doc->documentElement->localName;
        $this->root = '/'.self::ROOT_PREFIX.':'.$docName;
        $this->xpath = new \DOMXPath($doc);
        $this->xpath->registerNamespace(self::ROOT_PREFIX, $doc->documentElement->namespaceURI);
    }
public function loadXpathFromDoc ( \ DOMDocument $ doc ) { $ docName = $ doc -> documentElement -> localName ; $ this -> root = '/' . self :: ROOT_PREFIX . ':' . $ docName ; $ this -> xpath = new \ DOMXPath ( $ doc ) ; $ this -> xpath -> registerNamespace ( self :: ROOT_PREFIX , $ doc -> documentElement -> namespaceURI ) ; }
Init XPath from document.

@param \DOMDocument $doc
Init XPath from document .