Gets the root XmlElement for the document.
Option Strict
Option Explicit
Imports System
Imports System.IO
Imports System.Xml
Public Class Sample
Public Shared Sub Main()
'Create the XmlDocument.
Dim doc As New XmlDocument()
doc.LoadXml("<?xml version='1.0' ?>" & _
"<book genre='Computer' ISBN='1-111111-57-5'>" & _
"<title>C#</title>" & _
"</book>")
'Display the document element.
Console.WriteLine(doc.DocumentElement.OuterXml)
End Sub 'Main
End Class 'Sample
Related examples in the same category