Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Xmladapter.tocursor strange behaviour
Message
De
08/07/2004 14:09:53
 
 
À
08/07/2004 07:55:29
Information générale
Forum:
Visual FoxPro
Catégorie:
XML, XSD
Divers
Thread ID:
00921909
Message ID:
00922137
Vues:
15
>I found a behaviour in XMLAdapter.toCursor that seems very much like a bug.
>
>If I have a cursor in which one of the fields has the same name as the cursor itself (including case), when I serialize this cursor (oxmladapter.toxml) and then get the cursor back from the XML, the records are duplicated. Each record has a blank record associated.
>

Hi Francisco,

The behavior you see may be not always desired, but expected. The ToCursor method looks for record elements anywhere in the document. If a field element has the same name, it is going to be parsed as a record. There are several workarounds including: using different element names, different case, use attributes rather than elements to store field values. In VFP9, there is a new property XMLAdapter.RespectNesting that deals with the issue without any modifications to the XML document.

Thanks,
Aleksey.
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform