PicoFeed\Parser\Parser::registerSupportedNamespaces PHP Method

registerSupportedNamespaces() public method

Register all supported namespaces to be used within an xpath query.
public registerSupportedNamespaces ( SimpleXMLElement $xml ) : SimpleXMLElement
$xml SimpleXMLElement Feed xml
return SimpleXMLElement
    public function registerSupportedNamespaces(SimpleXMLElement $xml)
    {
        foreach ($this->namespaces as $prefix => $ns) {
            $xml->registerXPathNamespace($prefix, $ns);
        }
        return $xml;
    }