opensim/OpenSim/Framework/Util.cs
/// <summary>
/// Debug utility function to convert unbroken strings of XML into something human readable for occasional debugging purposes.
/// </summary>
/// <remarks>
/// Please don't delete me even if I appear currently unused!
/// </remarks>
/// <param name="rawXml"></param>
/// <returns></returns>
Debug utility function to convert unbroken strings of XML into something human readable for occasional debugging purposes.
Debug utility function to convert unbroken strings of XML into something human readable for occasional debugging purposes .
public static string GetFormattedXml(string rawXml)
        {
            XmlDocument xd = new XmlDocument();
            xd.LoadXml(rawXml);
            StringBuilder sb = new StringBuilder();
            StringWriter sw = new StringWriter(sb);
            XmlTextWriter xtw = new XmlTextWriter(sw);
            xtw.Formatting = Formatting.Indented;
            try
            {
                xd.WriteTo(xtw);
            }
            finally
            {
                xtw.Close();
            }
            return sb.ToString();
        }
public static string GetFormattedXml ( string rawXml ) { XmlDocument xd = new XmlDocument ( ) ; xd . LoadXml ( rawXml ) ; StringBuilder sb = new StringBuilder ( ) ; StringWriter sw = new StringWriter ( sb ) ; XmlTextWriter xtw = new XmlTextWriter ( sw ) ; xtw . Formatting = Formatting . Indented ; try { xd . WriteTo ( xtw ) ; } finally { xtw . Close ( ) ; } return sb . ToString ( ) ; }
Debug utility function to convert unbroken strings of XML into something human readable for occasional debugging purposes.
Debug utility function to convert unbroken strings of XML into something human readable for occasional debugging purposes .
None
rawXml
string
None
remarks
Please don't delete me even if I appear currently unused!
Please don ' t delete me even if I appear currently unused!