Imports System
Imports System.Xml
Imports System.Xml.XPath
Public Class MainClass
Public Shared Sub Main()
Dim root As XElement = _
aw:Att='content'
Att2='different content'/>
For Each att As XAttribute In root.Attributes()
Console.WriteLine("{0}={1}", att.Name, att.Value)
Next
Dim NewRoot As XElement = _
<%= _
From att In root.Attributes("Att2") _
Select New XAttribute(att.Name, "new content") _
%>>_
For Each att As XAttribute In NewRoot.Attributes()
Console.WriteLine("{0}={1}", att.Name, att.Value)
Next
End Sub
End Class