Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Preserving XML hierarchy when importing into cursors
Message
 
À
31/05/2005 16:51:23
Information générale
Forum:
Visual FoxPro
Catégorie:
XML, XSD
Versions des environnements
Visual FoxPro:
VFP 9
OS:
Windows XP
Divers
Thread ID:
01018844
Message ID:
01018877
Vues:
8
You can use MSXMLDOM and parse it to a treeview.
>Hi,
>
>I'm having trouble finding a solution to keep the hierarchy of an XML document when parsing. From the MSDN documentation, it seems like I should be using the XMLAdapter.loadXML() function which populates tables in the XMLAdapter object with the data, but doesn't seem to give any indexes or fields that I can then reconstruct the hierarchy with. I have attached the code below:
>
>LOCAL oXMLAdapter as XMLAdapter
>oXMLAdapter = NEWOBJECT('XMLAdapter')
>oXmladapter.RespectNesting = .T.
>oXMLAdapter.LoadXML(lc_incoming_dir + lc_filename,.T.)
>lc_count = oxmladapter.tables.Count
>FOR x=lc_count TO 1 STEP -1
> oxmladapter.tables.Item(x).tocursor
>ENDFOR
>
>There has to be a way to keep the hierarchy of the XML document, but for the life of me cannot find the code to do it. Any help will be much appreciated. Thanks.
Imagination is more important than knowledge
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform