oskar
2006-08-23 07:59:02 UTC
Hi,
Using Msxml2.DOMDocument.4.0 in VBScript (a .wsf-file).
I'm loading an xml document with '<?xml version="1.0" encoding="utf-8"?>'
declared.
I'm modifying it in the code, adding some nodes etc.
Then save it to another file using xmlDoc.save( "doc.xml").
Looking at the saved file in an HEX editor shows that the BOM (Byte Order
Mark) for UTF-8 is not there. If I open the xml file in notepad and save it
again, the BOM is added.
So, my question is, why is the BOM not added to the xml file when using the
save-method?
Thanks,
Oskar
Using Msxml2.DOMDocument.4.0 in VBScript (a .wsf-file).
I'm loading an xml document with '<?xml version="1.0" encoding="utf-8"?>'
declared.
I'm modifying it in the code, adding some nodes etc.
Then save it to another file using xmlDoc.save( "doc.xml").
Looking at the saved file in an HEX editor shows that the BOM (Byte Order
Mark) for UTF-8 is not there. If I open the xml file in notepad and save it
again, the BOM is added.
So, my question is, why is the BOM not added to the xml file when using the
save-method?
Thanks,
Oskar