XML DOM baseURI Property


Node Object Reference Node Object

Definition and Usage

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


Browser Support

Internet Explorer Firefox Opera Google Chrome Safari

The baseURI property is supported in all major browsers, except Internet Explorer.


Syntax

nodeObject.baseURI

Technical Details

Return Value: A String representing the absolute base URI of a node
DOM Version Core Level 3 Node Object


Example

The following code fragment loads "books_ns.xml" into xmlDoc using loadXMLDoc() and returns the base URI of the <title> elements:

Example

xmlDoc = loadXMLDoc("books_ns.xml");

x = xmlDoc.getElementsByTagName('title');

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

Try it yourself »

Node Object Reference Node Object

Color Picker

colorpicker