Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Newbie question on processing XML file
Message
 
 
Information générale
Forum:
Visual FoxPro
Catégorie:
XML, XSD
Divers
Thread ID:
00854652
Message ID:
00855213
Vues:
20
-------------

>>I want to extract values corresponding to different keys in the file.
[...]
But I want to learn the XML DOM functions and thought that someone might suggest a way to do it using XMLAdapter or some other DOM-specific functions.
------------

Do you want a collection of any nodes that have key attributes?

The syntax for that is:

oy= ox.selectNodes("//*[@key]")
? oy.length

Caveat: you can do it more efficiently if you know more about the structure of your document.

Or do you want to get just the valueof the node whose key matches a given value?

The syntax for that is:

oz = ox.selectSingleNode("//*[@key='key2']/@value").text
? oz

>L<
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform