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 — プレフィックスに基づいて、ノードの名前空間 URI を取得する
説明
public string DOMNode::lookupNamespaceURI
( string
$prefix
)
prefix に基づいて、
ノードの名前空間 URI を取得します。
パラメータ
-
prefix -
名前空間のプレフィックス。
返り値
ノードの名前空間 URI を返します。
