My understanding is that you can access Level 1 (Hospitalization) and Level 2 (Patient_Id,etc), itz hard to pull Level 3 (Wards, Diagnosis)
If that is the case, you can use generic recursive multi level XML node fetch logarithm as:
Function GetChildren(parentNode as TreeNode) as List(Of String)
Dim nodes as List(Of String) = New List(Of String)
GetAllChildren(parentNode, nodes)
return nodes
End Function
Sub GetAllChildren(parentNode as TreeNode, nodes as List(Of String))
For Each childNode as TreeNode in parentNode.Nodes
nodes.Add(childNode.Text)
GetAllChildren(childNode, nodes)
Next
End Function