I would try preloading the cursor with the fields as you wish them to be.
1. Do a CREATE CURSOR XMLDATA (.....field specs....)
2. Change 3rd parameter to 8192+512
That should free XMLTOCURSOR from trying to guess the field types and sizes.
Dan Covill
On 06/15/12 18:11, Sytze de Boer wrote:
> Friends, I need some help
>
> I need to import data from an XML file into a cursor/table
> I use the following line
> XMLTOCURSOR( (cXMLfile),"xmldata",512)
> and it gives me a beautiful cursor
> EXCEPT a whole lot of vital data is missing (fields)
>
> Example, herewith a number of lines from the file
> <?xml version="1.0" encoding="UTF-8"?>
> -<psr:CounterNotification xmlns:psr="urn:CounterList">
> <Date>2012-06-15T10:14:27</Date> <SendSetting Timing="SCHEDULE">
> </SendSetting> <MachineModel>TOSHIBA e-STUDIO2500c</MachineModel>
> <SerialNumber>CBA717996</SerialNumber> -<SupplierInfo> <SplName/>
> <Fax/> <Email/> <SplAddress/> </SupplierInfo> -<CustomerInfo>
> <CustName>Copy Service</CustName> <CustTelNumber/> <CustEMail/>
> <CustAddress/>
>
> My cursor gives me splname, fax,email,spladdress, custname
> I NEED the Serialnumber, plus a whole bunch of other fields it seems to skip
>
> I've checked for xml to csv file converters, but given up
> Is there anyone who can help me convert this type of file into a
> cursor or dbf or csv file?
>
_______________________________________________
Post Messages to: [email protected]
Subscription Maintenance: http://leafe.com/mailman/listinfo/profox
OT-free version of this list: http://leafe.com/mailman/listinfo/profoxtech
Searchable Archive: http://leafe.com/archives/search/profox
This message: http://leafe.com/archives/byMID/profox/[email protected]
** All postings, unless explicitly stated otherwise, are the opinions of the
author, and do not constitute legal or medical advice. This statement is added
to the messages for those lawyers who are too stupid to see the obvious.