XmlTextWriter.IndentChar : XmlTextWriter « System.Xml « VB.Net by API






XmlTextWriter.IndentChar

  

Imports System.Xml.Serialization, System.IO
Imports System.Xml
Public Class Tester
    Public Shared Sub Main
    
      Dim myXmlTextWriter As New XmlTextWriter("doc.xml", Nothing)

      With myXmlTextWriter
         .Formatting = Formatting.Indented
         .Indentation = 3
         .IndentChar = " "
         .WriteStartDocument()
         .WriteComment("This is a sample XML document generated" & _
            " using an XMLTextWriter object.")
         .WriteStartElement("UserChoice")
         .WriteElementString("element", "value")

         .WriteEndElement()
         .Close()
      End With
    End Sub

End Class

   
    
  








Related examples in the same category

1.XmlTextWriter.Formatting