CLOSE DATABASES all USE _samples+"\data\customer" IN 0 USE _samples+"\data\orders" IN 0 ORDER tag cust_id USE _samples+"\data\orditems" IN 0 ORDER tag order_id SET RELATION TO order_id INTO 'orditems' IN 'orders' SET RELATION TO cust_id INTO 'orders' IN 'customer' LOCAL oAdapter as XMLAdapter oAdapter = CREATEOBJECT('xmlAdapter') oAdapter.RespectNesting = .t. oAdapter.XMLName=STRCONV('MyNameInsteadOfVFPDataSet',12) oAdapter.AddTableSchema('customer',.f.) oAdapter.AddTableSchema('orders',.f.) oAdapter.AddTableSchema('orditems',.f.) oAdapter.XMLSchemaLocation = 'myExternalsSchema.xsd' oAdapter.ToXML('mynested.xml','',.t.)Cetin