Extensions.Attributes returns a filtered collection of the attributes
Imports System
Imports System.Xml
Imports System.Xml.XPath
Public Class MainClass
Public Shared Sub Main()
Dim xmlTree As XElement = _
<Root Att1="content1" Att2="content2">
<Child1 Att1="content3" Att2="content4">
</Child1>
<Child2 Att1="content5" Att2="content6">
</Child2>
</Root>
Dim attList = From att In xmlTree.Elements.Attributes("Att1") _
Select att
For Each att As XAttribute In attList
Console.WriteLine(att)
Next
End Sub
End Class