Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
XMLAdapter - parent/child cursors to XML
Message
General information
Forum:
Visual FoxPro
Category:
XML, XSD
Miscellaneous
Thread ID:
01065268
Message ID:
01065373
Views:
16
Sergey,

>> >Did you set RespectNesting=.T. ? <<

Aha! No I didn't.

Thank you very much. It is greatly appreciated!



>>Hi all,
>>
>>I am trying to use XMLAdapter to create an XML document describing two cursors having a parent/child relationship. The cursors are generated and the relationship established prior to using the XMLAdapter class.
>>
>>I use AddTableSchema to add each cursor, then call ToXML. The output is created without error, but analyzing the XML document seems to show two flat cursors, and no relationship existing obviously between then. The VFP Help file topic for AddTableSchema seems to say that table relationships are stored.
>>
>>Am I doing this correctly? What am I missing?
>
>Hi John,
>
>Did you set RespectNesting=.T. ? Try
>CLOSE DATABASES
>OPEN DATABASE (HOME(2)) + "Northwind\northwind.dbc"
>SELECT 0
>USE northwind!OrderDetails
>SET ORDER TO ORDERID && ORDERID
>SELECT 0
>USE northwind!Orders
>SET RELATION TO OrderID INTO OrderDetails
>oXA = CREATEOBJECT("XmlAdapter")
>oXA.RespectNesting = .T.
>oXA.AddTableSchema("Orders")
>oXA.AddTableSchema("OrderDetails")
>oXA.ToXML("Orders.xml",,.T.)
>Modify Command Orders.xml Nowait
>
John L. Miller
Logikos, Inc.
"Solutions With Software"
Tel: 979-826-6034
Fax: 979-826-8845
Previous
Reply
Map
View

Click here to load this message in the networking platform