Latest web development tutorials

XML DOM baseURI property

Attr Object Reference Attr objects

Definition and Usage

baseURI property returns attribute absolute reference URI.

grammar

attrObject.baseURI


Examples

The following code fragment uses loadXMLDoc () to " books_ns.xml " into xmlDoc and returns "lang" attribute reference URI:

Examples

xmlDoc=loadXMLDoc("books_ns.xml");

x=xmlDoc.getElementsByTagName('title');

for(i=0;i<x.length;i++)
{
document.write(x.item(i).attributes[0].baseURI);
document.write("
");
}

The code above will output:

http://www.w3cschool.cc/dom/books_ns.xml
http://www.w3cschool.cc/dom/books_ns.xml

try it"

Attr Object Reference Attr objects