Imports System
Imports System.Xml.Linq
Imports System.Xml.XPath
Public Class MainClass
Public Shared Sub Main()
Dim employees As XElement = XElement.Load("EmployeesAndTasks.xml")
Dim xpathQuery = employees.XPathSelectElements("/Employee/Tasks/Task")
For Each task In xpathQuery
Console.WriteLine("{0,-15} - {1} ({2})", task.Parent.Parent..Value, task..Value, task..Value)
Next
End Sub
End Class