开发者

XmlDocument OuterXml pretty printed

I've got a XmlDocument and I want to get the Content (OuterXml) as a pretty printed string. How can I do this?

Reg开发者_开发技巧ards


Assuming I understand this correctly

using System.Xml.Linq;
XDocument xDoc = XDocument.Load(@".....\test.xml");
string xDocString = xDoc.ToString(SaveOptions.None);
0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜