Extensions.Remove removes every attribute in the source collection from its parent element.
Imports System
Imports System.Xml
Imports System.Xml.XPath
Public Class MainClass
Public Shared Sub Main()
Dim root As XElement = <Root Att1="1" Att2="2" Att3="3" Att4="4" Att5="5"/>
Dim atList = From at In root.Attributes _
Where at.Value >= 3 _
Select at
atList.Remove()
Console.WriteLine(root)
End Sub
End Class