Jorge,
>Is there a way to specify to the cursortoxml function to state that thisfield is character en not numeric?
You need to specify to XMLTOCURSOR that it should embed an XML Schema into the XML file, so CURSORTOXML can reference the schema when converting back to a cursor. The sixth parameter as "1" indicates that you want an inline schema:
CURSORTOXML('mytable','myoutput.xml', 1, 512, 0, "1")