Compability: Internet Explorer
This method is used to load an XML document using the supplied string.
The loadXML method is used to load an XML document using the supplied string. It returns the boolean value of true if the load was successful; otherwise it returns false and sets the Document object's documentElement property to null.
Calling loadXML on an existing document immediately discards the content of it.
XMLString = "<Venues><venue>The Mayflower Theater</venue>" &_
"<venue>Carnegie Hall</venue></Venues>"
Set objXMLDoc = CreateObject("Microsoft.XMLDOM")
objXMLDoc.async = False
objXMLDoc.loadXML(XMLString)
Set Root = objXMLDoc.documentElement
response.write(Root.xml)
The Mayflower TheaterCarnegie Hall
This example creates an XML string, and uses the loadXML method to load it. The XML of the root element is then displayed.