Hi,
I have a problem writing to an xml file.
The error I get when I open the file is "Document must have top level element." Here's the code I am using.
<CODE>
Set doc = CreateObject("Microsoft.XMLDOM")
doc.async = false
doc.ValidateonParse = False
doc.resolveExternals = False
doc.LoadXml("<?xml version='1.0'?><Root><TEST id=0 type=1>ASP</TEST><TEST id=2 type=2>ASP</TEST></Root>")
doc.save "C:\Windows\test.xml"
set doc = Nothing
</CODE>
Does anybody know what is wrong?
Thank you.
I have a problem writing to an xml file.
The error I get when I open the file is "Document must have top level element." Here's the code I am using.
<CODE>
Set doc = CreateObject("Microsoft.XMLDOM")
doc.async = false
doc.ValidateonParse = False
doc.resolveExternals = False
doc.LoadXml("<?xml version='1.0'?><Root><TEST id=0 type=1>ASP</TEST><TEST id=2 type=2>ASP</TEST></Root>")
doc.save "C:\Windows\test.xml"
set doc = Nothing
</CODE>
Does anybody know what is wrong?
Thank you.