Would this work for you?
CLOSE DATABASES ALL
OPEN DATABASE (HOME(2) + "data\testdata")
USE testdata!customer
CREATE CURSOR HeaderRec (Author C(20), RecCount I)
INSERT INTO HeaderRec SELECT "John Doe", COUNT(*) FROM customer
oXA = CREATEOBJECT("XmlAdapter")
oXA.AddTableSchema("HeaderRec")
oXA.AddTableSchema("Customer")
oXA.ToXML("Customer.xml",,.T.)
MODIFY COMMAND Customer.xml NOWAIT
Check also
http://www.berezniker.com/x/jgI>I need to generate an xml file from a cursor that I am creating. I have the xml output generating properly by using the xmladapter class, but I want to insert a header record at the beginning of the XML file with the user information and # of records that are in the xml file. I saw some references on using user created schemas but I could not find and good samples or white papers on this subject. Does anyone
>have any idead where I can find out more about this ?
--sb--