Link to home
Start Free TrialLog in
Avatar of rutledgj
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(RootNode)

                                '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
Avatar of grossac
grossac
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial