VB.Net by API/System.Xml/XmlTextWriter — различия между версиями
Admin (обсуждение | вклад) м (1 версия) |
(нет различий)
|
Текущая версия на 12:50, 26 мая 2010
XmlTextWriter.Formatting
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
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