问题
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.
回答1:
Set the PreserveWhiteSpace property to true
before you save the document.
回答2:
set PreserveWhiteSpace to true
来源:https://stackoverflow.com/questions/1684253/xmldocument-class-is-removing-formatting-c-net