public function registerSupportedNamespaces(SimpleXMLElement $xml) { foreach ($this->namespaces as $prefix => $ns) { $xml->registerXPathNamespace($prefix, $ns); } return $xml; }