I am trying to load an XML document in a basic derived language the
supports COM. here is my code
Sub CreateXMLFile ()
Dim XMLDoc as Object
const FILEPATH as string = "C:\xml_log.xml"
sXML = "<testresults>" & sXML & "</testresults>"
Set XMLDoc = CreateObject("Microsoft.XMLDOM")
XMLDoc.async = False
XMLDoc.loadXML(sXML)
XMLDoc.save(FILEPATH)
End sub
This is what appears in variable sXML just before we assign the object
reference (formatted of course)
<testresults>
<test id=TESTID_10>
<teststatus>pass</teststatus>
<test id=TESTID_20>
<teststatus>fail</teststatus>
</testresults>
I have got two problems
1) Nothing appears in 'C:\xml_log.xml'
2) Also, I am unsure on how to add the XML declaration '<?xml
version="1.0"?>'
All help appreciated.
Cheers
Aidy