Share via


load Method (Compact 2013)

3/26/2014

Loads an XML document from the specified location.

Syntax

boolValue = oXMLDOMDocument.load(xmlSource);
HRESULT load(  VARIANT xmlSource,  VARIANT_BOOL* isSuccessful);

Parameters

Script

  • xmlSource
    String containing a URL that specifies the location of the XML file.

C/C++

  • xmlSource
    [in] Indicator of the source XML to parse. This may be an URL (String/BSTR), a Request object (in an ASP page), an IStream, SAFEARRAY of bytes (VT_ARRAY|VT_UI1), or a DOMDocument object, or any object that supports IStream, ISequentialStream, or IPersistStream. See Remarks.
  • isSuccessful
    [out, retval] True if the load succeeded; False if the load failed.

Return Value

Script

Boolean. Returns True if the load succeeded; False if the load failed.

C/C++

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

Remarks

If the URL cannot be resolved or accessed or does not reference an XML document, this method returns an error and sets the documentElement property of the DOMDocument to Null.

The load method can also take any object that supports IStream and the Microsoft® Internet Information Services (IIS) Request object.

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

Schemas are not applied when loading XML from a string.

This member is an extension of the World Wide Web Consortium (W3C) Document Object Model (DOM).

This method applies to the following interface:

DOMDocument.

Requirements

Header

msxml2.h,
msxml2.idl

Library

uuid.lib

See Also

Reference

XML DOM Methods
documentElement Property