Simple way to get the URI of the default namespace:
<?php
$document = new DOMDocument();
$document->load($xml_file);
$uri = $document->documentElement->lookupnamespaceURI(NULL);
?>
DOMNode->lookupNamespaceURI()
(No version information available, might be only in CVS)
DOMNode->lookupNamespaceURI() — Gets the namespace URI of the node based on the prefix
Descrição
DOMNode
string lookupNamespaceURI
( string $prefix
)
Gets the namespace URI of the node based on the prefix .
Parâmetros
- prefix
-
The prefix of the namespace.
Valor Retornado
The namespace URI of the node.
User Contributed Notes
DOMNode->lookupNamespaceURI()
DOMNode->lookupNamespaceURI()
lewar
05-Jun-2007 09:20
05-Jun-2007 09:20

DOMNode->isSupported()