Imports System
Imports System.IO
Imports System.Xml
public class Sample
public shared sub Main()
Dim writer as XmlTextWriter = new XmlTextWriter (Console.Out)
writer.Formatting = Formatting.Indented
writer.WriteStartElement("book")
writer.WriteElementString("title", "C#")
writer.WriteEndElement()
writer.Flush()
writer.WriteStartElement("cd")
writer.WriteElementString("title", "XML")
writer.WriteEndElement()
writer.Flush()
writer.Close()
end sub
end class