Microsoft XML 2.5 SDK


 

load Method

[This is preliminary documentation and subject to change.]

Loads an XML document from the specified location.

Syntax

boolValue = oXMLDOMDocument.load(url)

Parameters

url

String containing a Uniform Resource Locator (URL) that specifies the location of the XML file.

Returns

Boolean. Returns true if the load succeeded, or false if the load failed.

Remarks

If the URL cannot be resolved or accessed or does not reference an XML document, this method returns an error and sets the XMLDOMDocument object's documentElement property to null.

load can also take any object that supports IStream and the IIS Request object.

Calling load or loadXML on an existing document immediately discards the content of the document.

Note that schemas are not applied when loading XML from a string.

This member is an extension of the W3C DOM.

Example

The following VBScript example creates an XMLDOMDocument object and uses the load method to load a local XML file:

Dim xmlDoc
Set xmlDoc = CreateObject("microsoft.xmldom")
xmlDoc.async = False
xmlDoc.load("c:\books.xml")

Applies To

XMLDOMDocument