I am creating a lightweight editor in C# and would like to know the best method for converting a string into a nicely formatted XML string. I would hope that there\'s a pub
Jason's approach is the simplest. Here's the method:
private static string FormatXmlString(string xmlString) { System.Xml.Linq.XElement element = System.Xml.Linq.XElement.Parse(xmlString); return element.ToString(); }