When I've needed to do this, I either create the XML manually using TEXT..ENDTEXT or use CURSORTOXML.
m.lnResult=CURSORTOXML(ALIAS(),m.lcOutput,1,2+4+8+48+512,0,JUSTSTEM(m.lcOutput)+[schema.xsd]) It also really depends on how many columns you have but I did test with a ~33,000 record cursor with 46 columns and it created a 56MB XML files and separate schema file in a couple of seconds. BTW Fred is Craig's evil twin brother. He writes VB6 code... <vbg> -- rk -----Original Message----- From: profoxtech-boun...@leafe.com [mailto:profoxtech-boun...@leafe.com] On Behalf Of Rafael Copquin Sent: Friday, September 23, 2011 3:16 PM To: profoxt...@leafe.com Subject: xml adapter As part of my data transmission routine between branches of a client company, I chose to convert some dbf files into xml and then, with the compression dll by Fred Boyd that you guys pointed me to, I want to zip the xml file and then send it from the branches to head office or back. However, I was testing the xmladapter class and found that the bigger the file to convert, the longer the time it takes (which is logical of course). For instance, a dbf file with 13,000 records took 476 seconds to convert !! That is very unacceptable. People will think that the computer hanged and will phone me all the time for help or worse, will give up using the routine, defeating the whole purpose. My code is: local oXML use invitems && 13,000 records oXML=CreateObject('XmlAdapter') oXML.addtableschema('invitems') oXML.ToXML('c:\data\xmlfiles\XMLfile','',.t.) && generates a XMLfile called XMLfile.xml in the c:\data\xmlfiles folder the above operation took 8 minutes ! Is there a way to overcome this limitation? Am I doing something wrong? Rafael Copquin _______________________________________________ Post Messages to: ProFox@leafe.com Subscription Maintenance: http://leafe.com/mailman/listinfo/profox OT-free version of this list: http://leafe.com/mailman/listinfo/profoxtech Searchable Archive: http://leafe.com/archives/search/profox This message: http://leafe.com/archives/byMID/profox/DF1EEF11E586A64FB54A97F22A8BD04419F2CA5698@ACKBWDDQH1.artfact.local ** All postings, unless explicitly stated otherwise, are the opinions of the author, and do not constitute legal or medical advice. This statement is added to the messages for those lawyers who are too stupid to see the obvious.