>>Hi Cetin,
>>
>>thanks for your answer.
>>
>>
>>> private void WriteDataSetToXMLFile(DataSet ds, string filename)
>>> {
>>> if (ds == null) { return; }
>>> XmlTextWriter xmlWr = new XmlTextWriter(filename, Encoding.UTF8);
>>> xmlWr.Formatting = Formatting.Indented;
>>> XmlSerializer xs = new XmlSerializer(typeof(DataSet));
>>> xs.Serialize(xmlWr, ds);
>>> xmlWr.Close();
>>> }
>>
>>
>>This method writes to a file.
>>How can I change it to return the XML string as a return value of the method?
>
>You could use a memorystream:
>
>MemoryStream ms = new MemoryStream();
>XmlTextWriter xmlWr = new XmlTextWriter(ms, Encoding.UTF8);
>
>Cetin
Thanks Cetin, but I think I don't understand what exactly to do.
Can you complete the function?
I find this a bit confusing.
Holger Vorberg
Germany