XElement.HasElements tells whether this element has at least one child element.
Imports System
Imports System.Xml
Imports System.Xml.XPath
Public Class MainClass
Public Shared Sub Main()
Dim xmlTree1 As XElement = _
<Root>
<Child>1</Child>
</Root>
Console.WriteLine(xmlTree1.HasElements)
Dim xmlTree2 As XElement = <Root>contents</Root>
Console.WriteLine(xmlTree2.HasElements)
End Sub
End Class