Click to return to the XML (Extensible Markup Language) home page    
XMLDOMDocument load Metho...     XMLDOMDocument nodeFromID...     XMLDOMDocument Object    
Web Workshop  |  XML (Extensible Markup Language)

loadXML Method


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

[ Object Name ]
PlatformVersion
Win16:
Win32:
Mac:
Unix:
WinCE:
XMLDOMDocument


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.