... lcXmlFIle = "test01.xml" STRTOFILE(LcXMLFileHeader, lcXmlFIle) ... Set Textmerge On Set Textmerge To (lcXmlFIle) Noshow ADDITIVE ... Set Textmerge To Set Textmerge Off STRTOFILE(LcXmlFileFooter, lcXmlFIle, .T.)
>i wantto create xml file from query; >i should create xml file syntax like below, > >first, > ><pre> >LcXMLFileHeader = [<?xml version="1.0"?>]+; > [ <MainmsgBody> ]+; > [ <UserName>USR</UserName> ]+; > [ <PassWord>PWD</PassWord> ]+; > [ <Messages> ] >>
>Select * From data03\Customers Into Cursor CrsCustomers NOFILTER > >Select CrsCustomers >Go Top > >Set Textmerge On >Set Textmerge To ("test01.xml") Noshow > >For i=1 To Reccount() >\<Message> >\<Mesgbody><<ALLTRIM(CrsCustomers.custname)>></Mesgbody> >\<Number><<ALLTRIM(CrsCustomers.gsm)>></Number> >\</Message> > Skip In CrsCustomers >Endfor >Set Textmerge To >Set Textmerge Off > >*MODIFY COMMAND test01.xml >>
>LcXmlFileFooter = [ </Messages> ]+; > [ <Type>1</Type> ]+; > [ <Originator></Originator> ]+; > [ <Sdate></Sdate> ]+; > [ <Edate></Edate> ]+; > [ </MainmsgBody> ] >>