Microsoft XML 2.5 SDK


 

loadXML Method

[This is preliminary documentation and subject to change.]

Loads an XML document using the supplied string.

Syntax

boolValue = oXMLDOMDocument.loadXML(xmlString)

Parameters

xmlString

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.

Returns

Boolean. Returns true if the XML load succeeded. Returns false and sets the XMLDOMDocument object's documentElement property to NULL if the XML load failed.

Remarks

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

This member is an extension of the W3C DOM.

Example

The following VBScript example creates an XMLDOMDocument object, then uses its loadXML method to load the specified XML before displaying it:

Dim xmlDoc
Set xmlDoc = CreateObject("microsoft.xmldom")
xmlDoc.async = False
xmlDoc.loadXML("<customer><first_name>Joe</first_name><last_name>Smith</last_name></customer>")
MsgBox (xmlDoc.xml)

Applies To

XMLDOMDocument