Latest web development tutorials

XML DOM documentURI property

Document Object Reference Document Object

Definition and Usage

documentURI property sets or returns the location of the document.

grammar

documentObject.documentURI


Examples

The following code fragment uses loadXMLDoc () to " the Books.xml " into xmlDoc, showing the location of the XML document:

Examples

xmlDoc=loadXMLDoc("books.xml");
document.write("Document location: " + xmlDoc.documentURI);

Output:

Document location: http://www.w3cschool.cc/dom/books.xml

try it"

Document Object Reference Document Object