>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
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
--sb--