Imports System
Imports System.Reflection
Imports System.Xml
Module Module1
Sub Main()
Dim xml As XElement = XElement.Load("People.xml")
Dim record = xml.Descendants("firstname").First()
For Each tag In record.Ancestors()
Console.WriteLine(tag.Name)
Next
End Sub
End Module