Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
XMLAdapter toXML defaults numeric fields to 0
Message
 
 
À
06/06/2005 15:59:26
Information générale
Forum:
Visual FoxPro
Catégorie:
XML, XSD
Versions des environnements
Visual FoxPro:
VFP 9
OS:
Windows XP
Database:
Visual FoxPro
Divers
Thread ID:
01019951
Message ID:
01020639
Vues:
19
This message has been marked as the solution to the initial question of the thread.
Hi Kristin,

If you want Nulls in XML you've to put Nulls instead of empty values in the cursor fields. The IsNull property only controls if Nulls are allowed for specific field.

>Sorry, I meant to say that if there is an empty numeric field in the cursor, than it defaults to a 0 in the XML output. I would have thought that the isnull property = .T. would suppress the 0, but it did not seem to help. I have changed my code per your suggestion to:
>
>
>rec_type_counter = 1
>SELECT tablenames
>SCAN
>  oXMLAdapter.AddTableSchema(ALLTRIM(tablenames.rec_type))
>  lc_count = oXMLAdapter.Tables.Item(rec_type_counter).Fields.count
>  FOR i=1 TO lc_count
>    oXMLAdapter.Tables.Item(rec_type_counter).Fields.item(i).isnull = .T.
>  ENDFOR
>  rec_type_counter = rec_type_counter + 1
>ENDSCAN
>	
>oXMLadapter.TOXML(lc_outfile_name,,.t.)
>
>
>Thanks for you help.
--sb--
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform