loadXML Method
A version of this page is also available for
4/8/2010
Loads an XML document using the supplied string.
Script Syntax
boolValue = oXMLDOMDocument.loadXML(bstrXML);
Remarks
Script Parameters
- bstrXML
String containing the XML string to load into this XML document object. This string can contain an entire XML document or a well-formed fragment.
Script Return Value
Boolean. Returns True if the XML load succeeded. Returns False and sets the documentElement property of the DOMDocument to Null if the XML load failed.
C/C++ Syntax
HRESULT loadXML(
BSTR bstrXML,
VARIANT_BOOL* isSuccessful
);
Remarks
C/C++ Parameters
- bstrXML
[in] XML string to load into this XML document object. This string can contain an entire XML document or a well-formed fragment.
- isSuccessful
[out, retval] True if the XML load succeeded. This method returns False and sets the documentElement property of the DOMDocument object to Null if the XML 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.
Requirements
Header | msxml2.h, msxml2.idl |
Windows Embedded CE | Windows CE .NET 4.0 and later |
Windows Mobile | Windows Mobile Version 5.0 and later |
General Remarks
Calling the load Method or loadXML on an existing document immediately discards the content of the document. The loadXML will work only with UTF-16 or UCS-2 encodings.
This member is an extension of the World Wide Web Consortium (W3C) Document Object Model (DOM).
This method applies to the following interface:
Requirements
Header | msxml2.h, msxml2.idl |
Windows Embedded CE | Windows CE .NET 4.0 and later |
Windows Mobile | Windows Mobile Version 5.0 and later |