Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Can't convert this XML to cursor
Message
 
À
14/10/2005 17:04:41
Mike Sue-Ping
Cambridge, Ontario, Canada
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Versions des environnements
Visual FoxPro:
VFP 9
Divers
Thread ID:
01059325
Message ID:
01059437
Vues:
16
>Hi,
>
>I'm trying to convert some XML into a VFP cursor(s). XMLAdapter's LoadXML fails with the following:
>
Even with a schema and an "xsi:schemaLocation" tag and the XSDs, you may not be able to use the adapter.

Fortunately, with VFP, the command window and autocomplete you can work you way through the XML to figure out what needs to be done. Be sure to:
oXML=CREATEOBJECT("MSXML.DOMDocument") && Generic
oXML.async=.f.
oXML.setProperty("SelectionLanguage","XPath")


and then look at some of the xml GET functions to validate the data and [then] retrieve it. Some examples:
if oXMLChild-getAttribute("myXMLTagName")==[C] && Is this tag there?
selectSingleNode("*[local-name()='myXMLTagName']") && Get one node


You have the command window - and when learnig how to parse an XML - it comes in real handy!
Imagination is more important than knowledge
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform