Mega Code Archive

 
Categories / VB.Net / XML LINQ
 

Load the Employees xml and store the contents into an XDocument object

Imports System Imports System.Xml.Linq     Public Class MainClass         Public Shared Sub Main()             Dim xmlDoc As XDocument = XDocument.Load("Employees.xml")             Console.WriteLine("The document declaration is '{0}'", xmlDoc.Declaration.ToString)             Console.WriteLine("The root element is '{0}'", xmlDoc.Root.Name.LocalName)         End Sub     End Class