Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Converting dataset to xml
Message
From
28/10/2005 02:29:50
 
 
To
27/10/2005 16:13:54
Cetin Basoz
Engineerica Inc.
Izmir, Turkey
General information
Forum:
ASP.NET
Category:
XML
Miscellaneous
Thread ID:
01062521
Message ID:
01062868
Views:
10
>   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>
But there is still a small problem left.
The XML, returned by this method, looks like a diffgram!
Holger Vorberg
Germany
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform