Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Dbf to xml
Message
De
13/09/2010 08:20:32
 
 
À
13/09/2010 08:07:07
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Titre:
Divers
Thread ID:
01480953
Message ID:
01480956
Vues:
62
Change the 3rd argument to 2 ( Attribute-centric XML)
CURSORTOXML("lignebalance", "balancexml.xml", 2, 512, 0, "mySchema.xsd")

>here is the command line
>
>CURSORTOXML("lignebalance", "balancexml.xml", 1, 512, 0, "mySchema.xsd")
>
>
>here is the resulted xml file
>
><?xml version = "1.0" encoding="Windows-1252" standalone="yes"?>
><VFPData xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="mySchema.xsd">
>	<lignebalance>
>		<numerocomp>10</numerocomp>
>		<debitnmoin>0.0000</debitnmoin>
>		<creditnmoi>0.0000</creditnmoi>
>		<debitmouve>0.0000</debitmouve>
>		<creditmouv>0.0000</creditmouv>
>		<debitn>0.0000</debitn>
>		<creditn>0.0000</creditn>
>		<regrouper>0</regrouper>
>	</lignebalance>
>	<lignebalance>
>		<numerocomp>101</numerocomp>
>		<debitnmoin>0.0000</debitnmoin>
>		<creditnmoi>0.0000</creditnmoi>
>		<debitmouve>0.0000</debitmouve>
>		<creditmouv>0.0000</creditmouv>
>		<debitn>0.0000</debitn>
>		<creditn>0.0000</creditn>
>		<regrouper>0</regrouper>
>	</lignebalance>
>
>
>
>in this xml, each field is represented by a line.
>
>here is the expected result
>
>  <?xml version="1.0" encoding="UTF-8" standalone="yes" ?> 
>- <Balance DateDebut="2009-01-01" DateFin="2009-12-31" Regroupe="0">
>  <LigneBalance NumeroCompte="1011" DebitNmoinsUn="4087648" CreditNmoinsUn="0" DebitMouvementN="2018038711" CreditMouvementN="2001340096" DebitN="20786263" CreditN="0" /> 
>  <LigneBalance NumeroCompte="111121" DebitNmoinsUn="46562405" CreditNmoinsUn="0" DebitMouvementN="27257565" CreditMouvementN="33448765" DebitN="40371205" CreditN="0" /> 
>  <LigneBalance NumeroCompte="114112" DebitNmoinsUn="1170106" CreditNmoinsUn="0" DebitMouvementN="57803391" CreditMouvementN="56314357" DebitN="2659140" CreditN="0" /> 
>  <LigneBalance NumeroCompte="114121" DebitNmoinsUn="154600" CreditNmoinsUn="0" DebitMouvementN="921831" CreditMouvementN="962031" DebitN="114400" CreditN="0" /> 
>
>
>
>in the xml each record of the dbf table is written on a single line.
>
>my question is , how can i do have the following result.
Gregory
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform