Mega Code Archive
Extensions Remove(T) removes every node in the source collection from its parent node
Imports System
Imports System.Xml
Imports System.Xml.XPath
Public Class MainClass
Public Shared Sub Main()
Dim root As XElement = _
1
2
3
4
5
Dim elList = From el In root.Elements _
Where el.Value >= 3 _
Select el
elList.Remove()
Console.WriteLine(root)
End Sub
End Class