Function getNodeText(selNode As Node) As String
If selNode.Children = 0 Then
getNodeText = ""
Else
Dim xNode As Node
Dim i As Integer
Set xNode = selNode.Child
For i = 1 To selNode.Children
getNodeText = getNodeText & xNode.Text
getNodeText = getNodeText & getNodeText(xNode)
Set xNode = xNode.Next
Next i
End If
End Function