Solved

Need help reading xml document in vb.net

Posted on 2011-03-07
1
219 Views
Last Modified: 2012-08-14
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.
0
Comment
Question by:rutledgj
1 Comment
 
LVL 2

Accepted Solution

by:
grossac earned 500 total points
ID: 35058775
0

Featured Post

Free Trending Threat Insights Every Day

Enhance your security with threat intelligence from the web. Get trending threat insights on hackers, exploits, and suspicious IP addresses delivered to your inbox with our free Cyber Daily.

Join & Write a Comment

Article by: jpaulino
XML Literals are a great way to handle XML files and the community doesn’t use it as much as it should.  An XML Literal is like a String (http://msdn.microsoft.com/en-us/library/system.string.aspx) Literal, only instead of starting and ending with w…
I think the Typed DataTable and Typed DataSet are very good options when working with data, but I don't like auto-generated code. First, I create an Abstract Class for my DataTables Common Code.  This class Inherits from DataTable. Also, it can …
This demo shows you how to set up the containerized NetScaler CPX with NetScaler Management and Analytics System in a non-routable Mesos/Marathon environment for use with Micro-Services applications.
This video shows how to remove a single email address from the Outlook 2010 Auto Suggestion memory. NOTE: For Outlook 2016 and 2013 perform the exact same steps. Open a new email: Click the New email button in Outlook. Start typing the address: …

707 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

14 Experts available now in Live!

Get 1:1 Help Now