Imports System
Imports System.Xml
Imports System.Xml.XPath
Imports System.Collections
Imports System.Collections.Generic
Public Class MainClass
Public Shared Sub Main()
Dim xmlTree As XElement = _
Some text
element content
Dim das As IEnumerable(Of XElement) = _
From el In xmlTree.DescendantsAndSelf() _
Select el
For Each el In das
Console.WriteLine(el.Name)
Next
End Sub
End Class