XElement.Save (TextWriter) serializes this element to a TextWriter. : XML Save « XML LINQ « VB.Net






XElement.Save (TextWriter) serializes this element to a TextWriter.

  

Imports System
Imports System.Xml
Imports System.Xml.XPath
Imports System.IO
Public Class MainClass

    Public Shared Sub Main()
        Dim root As XElement = <Root><Child> Text </Child></Root>
        Using sw = New StringWriter()
            root.Save(sw)
            Console.WriteLine(sw.ToString())
        End Using

    End Sub
End Class

   
    
  








Related examples in the same category

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