XElement.Save (XmlWriter) serializes this element to an XmlWriter.
Imports System
Imports System.Xml
Imports System.Xml.XPath
Imports System.Text
Imports System.IO
Public Class MainClass
Public Shared Sub Main()
Dim sb As StringBuilder = New StringBuilder()
Dim xws As XmlWriterSettings = New XmlWriterSettings()
xws.OmitXmlDeclaration = True
Using xw = XmlWriter.Create(sb, xws)
Dim root As XElement = <Root>
<Child>child content</Child>
</Root>
root.Save(xw)
End Using
Console.WriteLine(sb.ToString())
End Sub
End Class