Information générale
Titre:
XMLAdapter toXML defaults numeric fields to 0
Versions des environnements
Hi,
When calling the toXML method, if the cursor I have loaded into the XMLAdapter object via AddTableSchema is blank, than it defaults to a 0 in the XML file. So I looped through all the tables I added and set the isnull property for every field to .T., but this doesn't seem to help. Are there any other properties that I am not finding that keep the toXML command from defaulting numeric fields to 0? I have included the relavent code below. Thanks in advance.
LOCAL oXMLAdapter as XMLAdapter
oXMLAdapter = NEWOBJECT('XMLAdapter')
oXMLAdapter.RespectNesting = .T.
oXMLAdapter.XMLSchemaLocation = ""
*Add all the tables to the XMLAdapter object
rec_type_counter = 1
SELECT tablenames
SCAN
command = "oXMLAdapter.AddTableSchema('"+tablenames.rec_type+"')"
&command
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.)
Suivant
Répondre
Voir le fil de ce thread
Voir le fil de ce thread à partir de ce message seulement
Voir tous les messages de ce thread
Voir tous les messages de ce thread à partir de ce message seulement