Saves all the children of the XmlDocument node to the specified XmlWriter. : XmlDocument « XML « VB.Net






Saves all the children of the XmlDocument node to the specified XmlWriter.

 

    
Imports System
Imports System.Xml
Imports System.Xml.Schema
Imports System.Xml.XPath

Class XPathValidation
    Public Shared Sub WriteXml(doc As XmlDocument)
        Dim writer As New XmlTextWriter(Console.Out)
        writer.Formatting = Formatting.Indented
        doc.WriteContentTo(writer)
        writer.Flush()
        Console.WriteLine()
    End Sub 'WriteXml
    Public Shared Sub Main()
    End Sub
End Class

   
  








Related examples in the same category

1.Create XmlDocument class.
2.XmlDocument.CloneNode
3.XmlDocument.CreateAttribute
4.XmlDocument.CreateCDataSection creates an XmlCDataSection containing the specified data.
5.XmlDocument.CreateComment creates an XmlComment containing the specified data.
6.XmlDocument.CreateDocumentFragment creates an XmlDocumentFragment.
7.XmlDocument.CreateDocumentType returns a new XmlDocumentType object.
8.XmlDocument.CreateElement creates an element with the specified name.
9.XmlDocument.CreateElement creates an element with the specified Prefix, LocalName, and NamespaceURI.
10.XmlDocument.CreateEntityReference creates an XmlEntityReference with the specified name.
11.Validates XmlDocument against the XML Schema Definition Language (XSD) schemas
12.Saves the XmlDocument node to the specified XmlWriter.
13.Gets the XmlDocument to which this node belongs.
14.Set InnerText to a string that includes markup
15.Set InnerXml to a string that includes markup
16.Create a shallow clone.
17.Gets or sets a value indicating whether to preserve white space in element content.
18.InnerXml includes the markup of the element
19.Gets or sets the tag format of the element.