Private archive copy · Unofficial site · Content copyright belongs to Runoob Tutorial and the original authors · View Original

XML DOM baseURI Property

XML DOM baseURI Property


Element Object Reference Element Object


Definition and Usage

The baseURI property returns the location (URI) of the XML document.

Syntax

elementNode.baseURI


Example

The following code snippet uses loadXMLDoc() to load "books.xml" Load into xmlDoc, and display the location of the XML document:

Example

xmlDoc=loadXMLDoc("books.xml");

x=xmlDoc.getElementsByTagName("book")[0];

document.write("Document location: " + x.baseURI);

Output:

Document location: https://www.runoob.com/try/demo_source/books.xml

Try it »


Element Object Reference Element Object