Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Hierarchal XML
Message
From
19/01/2005 23:57:50
 
General information
Forum:
Visual FoxPro
Category:
XML, XSD
Title:
Environment versions
Visual FoxPro:
VFP 8 SP1
OS:
Windows XP SP2
Network:
Windows 2003 Server
Database:
Visual FoxPro
Miscellaneous
Thread ID:
00978739
Message ID:
00978773
Views:
17
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
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform