There are times when you need to display an XML string to be able to view in a good format.
// Pretty XML format with consistant indentation.
public static String prettyXMLPrint(String XML)
{
String Result = “”;
MemoryStream msStream = new MemoryStream();
XmlTextWriter xmlWriter = new XmlTextWriter(msStream , Encoding.Unicode);
XmlDocument xmlDocument = new XmlDocument();
try
{
// Load the XmlDocument with the [...]