Get the URI of the namespace for an XHTML document:
The result of x will be:
The namespaceURI property returns the URI of the specified node's namespce.
Note: An element node inherits the namespace of its parent node, therefore, all elements in an XHTML document has the namespaceURI "http://www.w3.org/1999/xhtml".
This property is read-only.
The numbers in the table specify the first browser version that fully supports the property.
Property | |||||
---|---|---|---|---|---|
namespaceURI | Yes | 9.0 | Yes | Yes | Yes |
Return Value: | A String, representing the URI of the node's namespace, or null if the node is not in a namespace |
---|---|
DOM Version | Core Level 2 Node Object |
HTML DOM reference: node.isDefaultNamespace() Method