Latest web development tutorials

XML DOM namespaceURI property

Node Object Reference Node objects

Definition and Usage

namespaceURI property sets or returns the node namespace URI.

grammar

nodeObject.namespaceURI


Examples

The following code fragment uses loadXMLDoc () to " books_ns.xml " into xmlDoc, and returns the namespace URI <title> element:

Examples

xmlDoc=loadXMLDoc("books_ns.xml");

x=xmlDoc.getElementsByTagName('title');

for(i=0;i<x.length;i++)
{
document.write(x.item(i).namespaceURI);
document.write("
");
}

The code above will output:

http://www.w3cschool.cc/children/
http://www.w3cschool.cc/xml/

try it"

Node Object Reference Node objects