> private string WriteDataSetToXMLStr(DataSet ds) > { > if (ds == null) { return String.Empty; } > MemoryStream ms = new MemoryStream(); > XmlTextWriter xmlWr = new XmlTextWriter(ms, Encoding.UTF8); > xmlWr.Formatting = Formatting.Indented; > XmlSerializer xs = new XmlSerializer(typeof(DataSet)); > xs.Serialize(xmlWr, ds); > ms.Seek(0,SeekOrigin.Begin); > StreamReader sr = new StreamReader(ms); > string xml = sr.ReadToEnd(); > sr.Close(); > xmlWr.Close(); > return xml; > }thanks, it works. Even if I'm not sure, what really happens here. <s>