XML DOM namespaceURI Property
Element Object
Definition and Usage
The namespaceURI property returns the namespace URI of the selected element.
If the selected node is not an element or attribute, this property always returns NULL.
Syntax
elementNode.namespaceURI
Example
The following code snippet uses loadXMLDoc() to load "books_ns.xml" Load into xmlDoc, and from the first
Example
xmlDoc=loadXMLDoc("books_ns.xml");
x=xmlDoc.getElementsByTagName("title")[0];
document.write(x.namespaceURI);
The code above will output:
http://www.runoob.com/w3cnote/
Try it »
Element Object