Click to return to the XML (Extensible Markup Language) home page    
XMLDOMDocument implementa...     XMLDOMDocument loadXML Me...     XMLDOMDocument Object    
Web Workshop  |  XML (Extensible Markup Language)

load Method


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

[ Object Name ]
PlatformVersion
Win16:
Win32:
Mac:
Unix:
WinCE:
XMLDOMDocument


Back to topBack to top

Did you find this topic useful? Suggestions for other topics? Write us!

© 1999 Microsoft Corporation. All rights reserved. Terms of use.