You have to pass *null* to lookupNamespaceURI if you want to read the default namespace. Passing an empty string doesn't work - even though the documentation says that lookupNamespaceURI takes a string as argument (and null would just be converted to an empty string).
DOMNode::lookupNamespaceURI
(PHP 5)
DOMNode::lookupNamespaceURI — Gets the namespace URI of the node based on the prefix
Description
string DOMNode::lookupNamespaceURI
( string $prefix
)
Gets the namespace URI of the node based on the prefix.
Parameters
- prefix
-
The prefix of the namespace.
Return Values
The namespace URI of the node.
