Imports System
Imports System.Xml
Imports System.Xml.XPath
Public Class MainClass
Public Shared Sub Main()
Dim src As XElement = _
1
2
3
Dim xse As XStreamingElement = New XStreamingElement("NewRoot", _
From el In src.Elements() _
Where (CInt(el) >= 2) _
Select el _
)
Console.WriteLine(xse)
src.Add(New XElement("Child4", 4))
Console.WriteLine(xse)
End Sub
End Class