Tosch,
As the others have suggested, you can use a StringWriter, however be careful
as the StringWriter will assume UTF-16.
Dim buffer As New System.IO.StringWriter
Dim writer As New XmlTextWriter(buffer)
If you want or need the string stored in a different encoding (UTF-8) then
you may want to consider a MemoryStream instead... Or create a class that
inherits from StringWriterwhich overrides the StringWriter.Encoding property
and return the Encoding of your choice.
Hope this helps
Jay
"Tosch" <to**********@swissonline.ch> wrote in message
news:oo********************************@4ax.com...
I have successfully been using XMLTextWriter to write XML to a file.
But how to I write XML to a string which I can then use to store in a
database?
Tosch