   
loadXML()
Is a member of:
|
DOMDocument
|
Syntax
blnValue = objDOMDocument.loadXML(xmlString)
Remark
When you call the loadXML() method for a DOMDocument, any existing contents in the DOMDocument are discarded.
This is one of the two common ways to load XML into a DOMDocument (see the load() method). In the loadXML signature, xmlString is either a string that is an entire XML document or a well-formed fragment.
True or False is returned to indicate success or failure of the load.
loadXML bug in XML 2.0In the Microsoft XML 2.0 object, there is a bug in the loadXML() method. Unfortunately, when used from VB or VBScript, your code may return an error that says that there is a parse error. The error usually complains that you are using an element in your XML that is not declared in the DTD you have referenced.
The error looks something like this:
The element "PEOPLE" is used but not declared in the DTD/Schema.
The reason is that the loadXML() method, when called from VB or VBA, will always act as if the resolveExternals property of the document was false. There is no work-around, but it will be fixed for the next release of the Microsoft XML objects.    
This manuscript is an abridged version of a chapter
from the Manning
Publications book XML
Programming with VB and ASP. This chapter looks at the Microsoft DOM objects. NOTE: Most images have been removed to increase speed and many of the code comments have also been removed for presentation. Please purchase the book to enjoy the full experience of all the chapters with images and code comments!
|