PROPERTY:  Document::url

This property is a Microsoft extension to the W3C DOM.

Document.url

The url property contains the canonicalized URL for the last loaded XML document. If the document is being built in memory, it returns null. The url property is not updated after saving a document using the save method; to do this, reload the document with the load method.

To demonstrate, the following code loads the 'staff.xml' file and displays its url.

Code (JavaScript):
xml_doc = new ActiveXObject("Microsoft.XMLDOM");
xml_doc.async = false;
xml_doc.load("staff.xml");

document.write(xml_doc.url);

Output:
http://www.devguru.com/somedir/staff.xml



Copyright 1999-2001 by Infinite Software Solutions, Inc. All rights reserved.
Trademark Information