Mega Code Archive
XmlTextWriter Close closes this stream and the underlying stream
Option Explicit
Option Strict
Imports System
Imports System.IO
Imports System.Xml
Public Class Sample
Public Shared Sub Main()
Dim writer As XmlTextWriter = Nothing
writer = New XmlTextWriter(Console.Out)
writer.Formatting = Formatting.Indented
writer.Indentation = 4
writer.WriteStartElement("book")
writer.WriteStartElement("title")
writer.WriteString("Pride And Prejudice")
writer.WriteEndElement()
writer.WriteEndElement()
writer.Close()
End Sub
End Class