Imports System
Imports System.Xml.Linq
Public Class MainClass
Public Shared Sub Main()
Dim employees As XElement = XElement.Load("Employees.xml")
Dim titles As XElement = XElement.Load("Titles.xml")
Dim query = From emp In employees. _
Group Join title In titles. _
On emp.@id Equals title.@empId _
Into TitleList = Group _
Select EmployeeName = emp..Value, _
TitleList
For Each emp In query
Console.WriteLine(emp.EmployeeName)
For Each title In emp.TitleList
Console.WriteLine("{0} - {1}", title..Value, title..Value)
Next
Next
End Sub
End Class