XElement.Save (String) serialize this element to a file. : XML Save « XML LINQ « VB.Net






XElement.Save (String) serialize this element to a file.

  
        
Imports System
Imports System.IO

Imports System.Xml
Imports System.Xml.XPath

Public Class MainClass

    Public Shared Sub Main()
        Dim root As XElement = _ 
                <Root>
                    <Child>child content</Child>
                </Root>
        root.Save("Root.xml")
        Dim Str As String = File.ReadAllText("Root.xml")
        Console.WriteLine(Str)

    End Sub
End Class

   
    
  








Related examples in the same category

1.XElement.Save (String, SaveOptions) serialize element to a file, optionally disabling formatting.
2.XElement.Save (TextWriter) serializes this element to a TextWriter.
3.XElement.Save (TextWriter, SaveOptions) serializes this element to a TextWriter