X
HOME HTML CSS JAVASCRIPT SQL PHP JQUERY XML ASP.NET MORE...
REFERENCES | EXAMPLES | FORUM | ABOUT

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

Your suggestion:

Close [X]

Thank You For Helping Us!

Your message has been sent to W3Schools.

Close [X]
Search w3schools.com:

WEB BUILDING

Download XML Editor FREE Website BUILDER Free HTML5 Templates FREE Website Templates Free HTML Templates

SHARE THIS PAGE

facebook