Mega Code Archive

 
Categories / VB.Net / XML LINQ
 

Use XPath to get the tasks for each employee

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")         End Sub     End Class