private function getTargetNS($xpath)
    {
        $query   = "//*[local-name()='schema' and namespace-uri()='http://www.w3.org/2001/XMLSchema']/@targetNamespace";
        $targetNs =  $xpath->query($query);

        if ($targetNs) {
            foreach ($targetNs as $entry) {
                return $entry->nodeValue;
            }
        }
    }
private function getTargetNS($xpath)
    {
        $query   = "//*[local-name()='schema' and namespace-uri()='http://www.w3.org/2001/XMLSchema']/@targetNamespace";
        $targetNs =  $xpath->query($query);

        if ($targetNs) {
            foreach ($targetNs as $entry) {
                return $entry->nodeValue;
            }
        }
    }
private function getTargetNS ( $ xpath ) { $ query = "//*[local-name()='schema' and namespace-uri()='http://www.w3.org/2001/XMLSchema']/@targetNamespace" ; $ targetNs = $ xpath -> query ( $ query ) ; if ( $ targetNs ) { foreach ( $ targetNs as $ entry ) { return $ entry -> nodeValue ; } } }
Return target namespace for given DOMXPath object

@param DOMXPath $xpath DOMXPath Object

@return string
Return target namespace for given DOMXPath object