XNode.ToString returns the XML for this node, optionally disabling formatting.
Imports System
Imports System.Xml
Imports System.Xml.Schema
Class MainClass
Shared Sub Main()
Dim root As XElement = <Root>
<Child/>
</Root>
Console.WriteLine(root.ToString(SaveOptions.DisableFormatting))
Console.WriteLine(root.ToString(SaveOptions.None))
End Sub
End Class