Microsoft XML SDK 2.6 - XML Reference

IXMLDOMDocument::load Method

Loads an XML document from the specified location.

Visual Basic Syntax

boolValue = oXMLDOMDocument.load(xmlSource)

C/C++ Syntax

HRESULT load(
    VARIANT xmlSource,
    VARIANT_BOOL *isSuccessful);

Parameters

xmlSource [in]
Indicator of the object that specifies the source for the XML document. The object can represent a URL, a Request object, an IStream, a SAFEARRAY, or a DOMDocument object. For details, see the Remarks section below.
isSuccessful [out]
True if the load succeeded; False if the load failed.

C/C++ Return Values

S_OK
Value returned if successful.
S_FALSE
Value returned if the load fails.
E_INVALIDARG
Value returned if isSuccessful is Null.

Remarks

The load behavior differs based on the object specified by the xmlSource parameter.

Object Description
string Specifies the URL to be loaded. This URL must meet basic security constraints to be accessed. If the URL cannot be resolved or accessed or does not reference an XML document, this method returns an error and sets the IXMLDOMDocument interface's documentElement property to Null.
ASP Request object Reads and parses the data from the Request object.

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

This member is an extension of the W3C DOM.

See Also

IXMLDOMDocument Interface | XML DOM Persistence