XElement.Save (TextWriter) serializes this element to a TextWriter.
Imports System
Imports System.Xml
Imports System.Xml.XPath
Imports System.IO
Public Class MainClass
Public Shared Sub Main()
Dim root As XElement = <Root><Child> Text </Child></Root>
Using sw = New StringWriter()
root.Save(sw)
Console.WriteLine(sw.ToString())
End Using
End Sub
End Class