private string FormatXML(string xmlString) { string retVal = ""; XmlDocument doc = new XmlDocument(); doc.PreserveWhitespace = true; doc.LoadXml(xmlString); System.IO.MemoryStream ms = new MemoryStream(); XmlTextWriter xtw = new XmlTextWriter(ms, new System.Text.UTF8Encoding(false)); xtw.Formatting = Formatting.Indented; xtw.Indentation = 4; doc.Save(xtw); byte[] xmlBytes = ms.ToArray(); foreach (byte b in xmlBytes) { retVal += (char)b; } return retVal; }This works just fine for a small amount (10K) of data returned, but when the output is aroung 100K or so, it takes forever. Is there an alternative way of formatting this XML in the textbox?