Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
How to combine strings & XML
Message
 
À
Tous
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Titre:
How to combine strings & XML
Divers
Thread ID:
01086420
Message ID:
01086420
Vues:
75
Hi All,
i wantto create xml file from query;
i should create xml file syntax like below,

first,
LcXMLFileHeader = [<?xml version="1.0"?>]+;
	[ <MainmsgBody> ]+;
	[ <UserName>USR</UserName> ]+;
	[ <PassWord>PWD</PassWord> ]+;
	[ <Messages> ]
then xml file body will come from query,
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
after created body text
i should combine header+body+footer sections
LcXmlFileFooter = [ </Messages> ]+;
	[ <Type>1</Type> ]+;
	[ <Originator></Originator> ]+;
	[ <Sdate></Sdate> ]+;
	[ <Edate></Edate> ]+;
	[ </MainmsgBody> ]
i've tried some combines tries but was not succesfull

How would be shortway for this,

header+footer section is static only body sections is dynamic

TIA
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform