I'm sorry, I did not appreciate that you are building this from .NET - is there not a similar function to XMLAdapter in .NET (I haven't done anything in .NET)?
But on the VFP side, I am keeping a table with the correct structure for the XML being passed - so if I *receive* an XML message without the schema I do something like this:
ln_recs = XMLTOCURSOR(pc_XMLRecord, "CustVendCursor")
IF ln_recs > 0
COPY TO (lc_tmpdir + lc_cvtemp + ".dbf") && a temporary table
USE IN CustVendCursor
USE (CustVendXMLDefTable) ALIAS CustVendDef NOUPDATE SHARED
*-- a "standard" table I can use in case the schema was missing and therefore the data was not correctly formatted (e.g. if one character passed in a field capable of (say) 6 characters then the field is only one character wide)
COPY STRUCTURE TO (lc_tmpdir + lc_cvtable + ".dbf") && the table we will now use
USE IN CustVendDef
*-- Open the table that has the correct structure
USE (lc_tmpdir + lc_cvtable + ".dbf") ALIAS Clients EXCLUSIVE
*-- Append the records passed without the schema
APPEND FROM (lc_tmpdir + lc_cvtemp + ".dbf")
ENDIF
ERASE (lc_tmpdir + lc_cvtemp + ".dbf")
Précédent
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