views:

203

answers:

2

Hi, i was wondering if anyone knows how to stop xmldocument.Save() from reformatting the document.

Its not that the document is not formatted correctly with respect to XML, the particular document i am working with has lots of white space and things like that which - upon save - is all being removed.

+6  A: 

Set the PreserveWhiteSpace property to true before you save the document.

Mike Atlas
A: 

set PreserveWhiteSpace to true

mfeingold