public function xPath()
{
$xpath = new \DOMXpath($this);
$this->defaultnamespace = $this->documentElement->lookupNamespaceUri(NULL);
$xpath->registerNamespace('epp', $this->defaultnamespace);
if (is_array($this->xpathuri)) {
foreach ($this->xpathuri as $uri => $namespace) {
if ($namespace != 'epp') {
// epp was already registered as default namespace, see above
$xpath->registerNamespace($namespace, $uri);
}
}
}
# if (is_array($this->exturi))
# {
# foreach($this->exturi as $uri=>$namespace)
# {
# echo "RegisterNamespace exturi $namespace $uri\n";
# $xpath->registerNamespace($namespace,$uri);
# }
# }
return $xpath;
}