Imports System
Imports System.Text
Imports System.Xml
Imports System.Xml.Schema
Class MainClass
Shared Sub Main()
Dim sb As StringBuilder = New StringBuilder()
Dim xws As XmlWriterSettings = New XmlWriterSettings()
xws.OmitXmlDeclaration = True
xws.Indent = True
Using xw = XmlWriter.Create(sb, xws)
xw.WriteStartElement("Root")
Dim child1 As XElement =
some
child1.WriteTo(xw)
Dim child2 As XElement =
different
child2.WriteTo(xw)
xw.WriteEndElement()
End Using
Console.WriteLine(sb.ToString())
End Sub
End Class