Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Parsing the unknown
Message
From
17/02/2005 17:43:31
 
 
To
All
General information
Forum:
ASP.NET
Category:
XML
Title:
Parsing the unknown
Miscellaneous
Thread ID:
00988142
Message ID:
00988142
Views:
77
I am trying to get a list of all of the data in an XML doc. I thought something like this would work but it returns the whole doc as one item :( anyone have something for this?
        Dim xdoc As XmlDocument = New XmlDocument
        Dim xnode As XmlNode
        Dim xChild As XmlEntity
        Dim retval As String

        xdoc.LoadXml(xstr)    ' Any well formed XML 

        For Each xnode In xdoc
            retval &= "<B>" & xnode.Name.ToString & "</B>"
            retval &= xnode.InnerText.ToString & "<BR>"
            For Each xChild In xnode
                retval &= "<B>" & xChild.Name.ToString & "</B>"
                retval &= xChild.InnerText.ToString & "<BR>"
            Next
        Next
My Thanks in advance,
~Joe Johnston USA

"If ye love wealth better than liberty, the tranquility of servitude better than the animated contest of freedom, go home from us in peace. We ask not your counsel or arms. Crouch down and lick the hands which feed you. May your chains set lightly upon you, and may posterity forget that ye were our countrymen."
~Samuel Adams

Next
Reply
Map
View

Click here to load this message in the networking platform