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);
精彩评论