Imports System
Imports System.Reflection
Imports System.Xml
Module Module1
Sub Main()
Dim xml As XElement = XElement.Load("People.xml")
Dim query = From p In xml.Elements("person") _
Where p.Element("id").value = 1 _
Select p
For Each record In query
Console.WriteLine("Person: {0} {1}", _
record.Element("firstname"), _
record.Element("lastname"))
Next
End Sub
End Module