Read and write XML with XmlReader and XmlWriter : XML File Creation « XML « VB.Net






Read and write XML with XmlReader and XmlWriter

  

Imports System.Xml

Public Class Example1

    Shared Sub Main()
        Dim reader As XmlReader
        Dim writer As XmlWriter

        reader = XmlReader.Create("pubs.xml")
        writer = XmlWriter.Create("output.xml")

        While reader.Read()
            writer.WriteNode(reader, True)
        End While

        reader.Close()
        writer.Close()
    End Sub
End Class

   
    
  








Related examples in the same category

1.Use XmlWriter to generate XML documentUse XmlWriter to generate XML document
2.Create XML document: XmlDocument, XmlAttribute, XmlElement
3.Build an XML DocumentBuild an XML Document
4.Output with XmlWriter
5.Creating Xml with XmlTextWriter