Reputation: 427
I use
Set xmlDoc = CreateObject("Microsoft.XMLDOM")
in my VBS to edit an XML. At the end, when I update my specific line in my XML file, I use
strResult = xmldoc.save(strFile)
The problem is, my XML file (before edit) has a carriage but after the .save()
method the entire carriage returns disappears.
How can I keep them? It is possible?
Upvotes: 0
Views: 330
Reputation: 1461
You can set the preserveWhiteSpace property of the document object to true.
xmldoc.preserveWhiteSpace = true
Upvotes: 2