Fabio,
Another option, if you already *know* the schema of the cursor, is to create an empty cursor and then use the new flag for XMLTOCURSOR() (the new flag was introduced in SP1 ... it is 8192) ... this will append to the existing cursor and thus get all the fields and data types correct.
~~Bonnie
>Hi Brian,
>
>Besides what Travis said, you should be aware of the importance of using schemas in order to avoid the "best guess" heuristic VFP uses when converting XML to a cursor (XMLTOCURSOR()). When you do not use schemas in your XML and use the XMLTOCURSOR() function to generate a cursor from the XML, VFP can fail in discovering what data types and sizes your fields have.