XContainer.Elements Method returns a filtered collection of the child elements of this element or document
Imports System
Imports System.Xml
Imports System.Xml.XPath
Public Class MainClass
Public Shared Sub Main()
Dim xmlTree As XElement = _
<Root>
<Type1>1</Type1>
<Type1>2</Type1>
<Type2>3</Type2>
<Type2>4</Type2>
<Type2>5</Type2>
</Root>
Dim elements = From el In xmlTree.<Type2> _
Select el
For Each el In elements
Console.WriteLine(el)
Next
End Sub
End Class