original_string: 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);
      }
code: 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);
      }
code_tokens: 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 ) ; }
docstring: Init XPath from document.
  
  @param \DOMDocument $doc
docstring_tokens: Init XPath from document .