>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
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