От: | Igor Soukhov | ||
Дата: | 25.08.02 13:05 | ||
Оценка: | 6 (1) |
public static string XmlDocumentAsString(XmlDocument doc, Encoding enc)
{
using (MemoryStream ms = new MemoryStream())
{
XmlTextWriter xtw = new XmlTextWriter(ms, enc);
xtw.Formatting = Formatting.Indented;
doc.Save(xtw);
return enc.GetString(ms.ToArray());
}
}