Imports System
Imports System.Xml
Imports System.Xml.XPath
Public Class MainClass
Public Shared Sub Main()
Dim xmlTree As XElement = _
aaaText bbb
cccText ddd
Dim nodes = xmlTree..Nodes()
For Each node As XNode In nodes
Select Case node.NodeType
Case XmlNodeType.Element
Console.WriteLine("Element: {0}", DirectCast(node, XElement).Name)
Case XmlNodeType.Text
Console.WriteLine("Text: {0}", DirectCast(node, XText).Value)
End Select
Next
End Sub
End Class