I'm playing around with this a bit, but Kix doesn't seem to handle this object model correctly?

Code:
$objXMLDoc = CreateObject("Microsoft.XMLDOM") 
$objXMLDoc.async = False
$=$objXMLDoc.load("C:\my.xml")

$j = " version = " + chr(34) +"1.0" + chr(34)

Dim $objNewPI, $currNode
$objNewPI = $objXMLDoc.createProcessingInstruction("xml", $j)
? "EE0:"@error
? "ES0:"@Serror

$d = $objXMLDoc.firstChild
? "EE1:"@error
? "ES1:"@Serror
$= $objXMLDoc.insertBefore ($objNewPI,$d)
$= $objXMLDoc.save("C:\my.xml")



Beyond that, it seems as though preservewhitespace is completely ignored. With the code you guys have so far, the indenting should be there...
_________________________
-Jim

...the sort of general malaise that only the genius possess and the insane lament.