Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Parsing the unknown
Message
 
 
À
Tous
Information générale
Forum:
ASP.NET
Catégorie:
XML
Titre:
Parsing the unknown
Divers
Thread ID:
00988142
Message ID:
00988142
Vues:
76
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

Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform