thanks for your help. this is what I was after:
Code:Dim memorystream As New MemoryStream() Dim xmlwriter As New XmlTextWriter(memorystream, System.Text.Encoding.UTF8) xmlwriter.WriteStartElement("option") xmlwriter.WriteString(TextBox1.Text) xmlwriter.WriteEndElement() xmlwriter.Flush() Dim stream_reader As New StreamReader(memorystream) memorystream.Seek(0, SeekOrigin.Begin) Console.WriteLine(stream_reader.ReadToEnd())




Reply With Quote
