>I am trying to import an XML file into FoxPro, to ultimately convert to Excel or text. However, when I use XMLTOCURSOR, it truncates the lead 0's, since it assumes that fields with only numbers are numeric, even though some of them are used as ID fields. Although I found a workaround by using a Treeview, and converting it from there, is there an easier way to convert the XML file without losing the lead 0's?
You can create the cursor in advance, have these columns as character, then xmltocursor() to your existing cursor. That way Fox doesn't have to guess the schema, it will use yours.
I tried that only once, so YMMV.