rutledgj
asked on
Need help reading xml document in vb.net
I currently have some code that works fine for reading an xmlresponse from a web call. The problem is that I need to read the nodes from bottom to top instead of top down.
I currently do this:
Dim MedNodes As XmlNodeList
'Now process the repeating nodes
MedNodes = XmlDoc.SelectNodes(RootNod e)
'Spin through the nodes and create a list of patients for this org
For Each n As XmlNode In MedNodes
If n.HasChildNodes Then
For Each x As XmlNode In n.ChildNodes
If x.Name.ToLower.Trim <> "number" Then
Dim p As New Patient
p.lstNodeValues = ProcessNode(x, lstMyThreadNodeData, MyVendor.Org)
p.lstGlobalNodes = Me.lstMyThreadGlobalNodes
lstPatients.Add(p)
End If
Next
End If
Next
I need to not do next but start at bottom of n.childnodes.
I currently do this:
Dim MedNodes As XmlNodeList
'Now process the repeating nodes
MedNodes = XmlDoc.SelectNodes(RootNod
'Spin through the nodes and create a list of patients for this org
For Each n As XmlNode In MedNodes
If n.HasChildNodes Then
For Each x As XmlNode In n.ChildNodes
If x.Name.ToLower.Trim <> "number" Then
Dim p As New Patient
p.lstNodeValues = ProcessNode(x, lstMyThreadNodeData, MyVendor.Org)
p.lstGlobalNodes = Me.lstMyThreadGlobalNodes
lstPatients.Add(p)
End If
Next
End If
Next
I need to not do next but start at bottom of n.childnodes.
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.