public function getPaths(\DOMElement $nodeList, $level = 0)
    {
        $output = $nodeList->getNodePath();

        foreach ($nodeList->childNodes as $childObject) {
            $output .= $childObject->getNodePath() . "\n";

            if ($childObject instanceof \DOMElement) {
                $output .= $this->getElement($childObject, $level + 1, true);
            }
        }
        return $output;
    }
public function getPaths(\DOMElement $nodeList, $level = 0)
    {
        $output = $nodeList->getNodePath();

        foreach ($nodeList->childNodes as $childObject) {
            $output .= $childObject->getNodePath() . "\n";

            if ($childObject instanceof \DOMElement) {
                $output .= $this->getElement($childObject, $level + 1, true);
            }
        }
        return $output;
    }
public function getPaths ( \ DOMElement $ nodeList , $ level = 0 ) { $ output = $ nodeList -> getNodePath ( ) ; foreach ( $ nodeList -> childNodes as $ childObject ) { $ output .= $ childObject -> getNodePath ( ) . "\n" ; if ( $ childObject instanceof \ DOMElement ) { $ output .= $ this -> getElement ( $ childObject , $ level + 1 , true ) ; } } return $ output ; }
Getter for retrieving xpath from a DOMElement

@param \DOMElement $nodeList
@param integer $level
@return type
Getter for retrieving xpath from a DOMElement