This method is a Microsoft extension to the W3C DOM.
Document.loadXML(xmlString)
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.
The following example creates an XML string, and uses the loadXML
method to load it. The XML of the root element is then displayed.
Code (VBScript):
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)
Output:
The Mayflower TheaterCarnegie Hall
|