XML DOM baseURI property
Definition and Usage
baseURI property returns an absolute reference node URI.
grammar
nodeObject.baseURI
Examples
The following code fragment uses loadXMLDoc () to " books_ns.xml " into xmlDoc and returns the <title> element base URI:
Examples
xmlDoc=loadXMLDoc("books_ns.xml");
x=xmlDoc.getElementsByTagName('title');
for(i=0;i<x.length;i++)
{
document.write(x.item(i).baseURI);
document.write("
");
}
x=xmlDoc.getElementsByTagName('title');
for(i=0;i<x.length;i++)
{
document.write(x.item(i).baseURI);
document.write("
");
}
The code above will output:
http://www.w3cschool.cc/dom/books_ns.xml
http://www.w3cschool.cc/dom/books_ns.xml
http://www.w3cschool.cc/dom/books_ns.xml
try it"
Node objects