XmlDocument类是消除格式,C#.NET [英] XmlDocument class is removing formatting, c#, .NET
本文介绍了XmlDocument类是消除格式,C#.NET的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我不知道是否有人知道如何从格式化文件停止xmldocument.Save()。
i was wondering if anyone knows how to stop xmldocument.Save() from reformatting the document.
它不是该文件是不是针对XML格式正确无误,特定的文件我与工作有许多白色空间之类的东西它 - 在保存 - 是所有被删除
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.
推荐答案
设置 PreserveWhiteSpace 属性真
在保存文档之前。
Set the PreserveWhiteSpace property to true
before you save the document.
这篇关于XmlDocument类是消除格式,C#.NET的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文