Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Hierarchal XML
Message
De
19/01/2005 23:57:50
 
Information générale
Forum:
Visual FoxPro
Catégorie:
XML, XSD
Titre:
Versions des environnements
Visual FoxPro:
VFP 8 SP1
OS:
Windows XP SP2
Network:
Windows 2003 Server
Database:
Visual FoxPro
Divers
Thread ID:
00978739
Message ID:
00978773
Vues:
15
Greg,

>Is it possible using the xmlAdapter Class to output heirarchal XML from vfp cursors (or tables) such as something like this ?

VFP9's XMLAdapter added considerablely to the features for Hierarchical XML and can nest one table's records inside another table. You have to have the tables open and related to each other first, then you can use code like this from a Microsoft sample:
oXA=CREATEOBJECT("XMLAdapter")

oXA.RespectNesting=.T.
oXT=oXA.AddTableSchema("foo")
oXT.Nest(oXA.AddTableSchema("foo1"))
oXT.FirstNestedTable.Nest(oXA.AddTableSchema("foo2"))

oXa.ToXML("hierxml.xml",,.T.)
I have not tried it with persistent relationships in a DBC, but it does work with SET RELATIONS. I don't know of a way to handle this with XMLAdapter in VFP8.
David Stevenson, MCSD, 2-time VFP MVP / St. Petersburg, FL USA / david@topstrategies.com
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform