Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Processing an XML file to VFP cursors
Message
Information générale
Forum:
Visual FoxPro
Catégorie:
XML, XSD
Divers
Thread ID:
00904549
Message ID:
00960106
Vues:
13
Jamie,
Thanks for helping Carmel an I with this post.

I am moving some Java DOM services to M$'s IXMLDOM. Could you offer any advice on that transition?


>Carmel
>If you use VFP8, just check out the XMLAdapter Class.
>If you are using previous versions, you should manually scan your xml using XMLDom and enter the data into your tables.
>Scannig your data manually would look something like the following:
>ox = CreateObject("MSXml.DOMDocument")
>ox.Load( YourXmlSource ) && or ox.LoadXML( YourXMLString )
>myXmlString = ox.DocumentElement
>** now retrieve some fields **
>myRevNode = myXmlString.SelectSingleNode( "authentication/revision" )
>myRevision = myRevNode.Text
>myResNode = myXmlString.SelectSingleNode( "authentication/reseller_shortcut")
>MyReseller = myResNode.Text
>
>** loop through the customer nodes
>myCustomers = myXmlString.SelectNodes( "customers" )
>for each oCostumer in myCustomers
>   tmpName = oCostumer.SelectSingleNode("customer/name")
>   ? tmpName.Text
>endfor
>** it's a pain, i know, but you can control everything
>
>HTH
>Jaime
>
Imagination is more important than knowledge
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform