Click to return to the XML (Extensible Markup Language) home page    
IXMLDOMDocument::implemen...     IXMLDOMDocument::loadXML ...     IXMLDOMDocument Interface    
Web Workshop  |  XML (Extensible Markup Language)

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 an IXMLDOMDocument. For details, see the Remarks section below.
isSuccessful
[out] True if the load succeeded, or false if the load failed.

C/C++ Return Values

S_OK
Value returned if successful.
S_FALSE
Value when VARIANT_FALSE is returned. 
E_INVALIDARG
Value returned if isSuccessful is null.

Remarks

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

ObjectDescription
StringSpecifies 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.

IIS 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.



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.