Easy Tutorial
❮ Dom Methods Dom Document ❯

XML DOM baseURI Property



Definition and Usage

The baseURI property returns the absolute base URI of the node.

Syntax


Example

The following code snippet uses loadXMLDoc() to load "books_ns.xml" into xmlDoc and returns the base URI of the <title> elements:

Example

xmlDoc=loadXMLDoc("books_ns.xml");

x=xmlDoc.getElementsByTagName('title');

for(i=0;i&lt;x.length;i++)
{
  document.write(x.item(i).baseURI);
  document.write("");
}

❮ Dom Methods Dom Document ❯