url Property (DOMDocument)
Returns the URL for the last loaded XML document.
var objurl = objXMLDOMDocument.url;
Example
The following script example creates a DOMDocument and displays the value of its url property.
var xmlDoc = new ActiveXObject("Msxml2.DOMDocument.3.0"); xmlDoc.async = false; xmlDoc.load("books.xml"); if (xmlDoc.parseError.errorCode != 0) { var myErr = xmlDoc.parseError; WScript.Echo("You have error " + myErr.reason); } else { WScript.Echo(xmlDoc.url); }
String. The property is read-only. It returns the URL from the last successful load. If the document is being built in memory, this property returns Null.
The url property is not updated after saving a document with the save method. To update the url property, reload the document using the load method.
This member is an extension of the Worldwide Web Consortium (W3C) Document Object Model (DOM).
