Trying to convert an xml into a dbf

Forum for DBF Commander discussing.

Trying to convert an xml into a dbf

Postby mbirnholz » Mon Jul 25, 2016 3:36 pm

I have a small xml file with about 20 columns of data in it . I followed the instructions precisely and created a map file. I then run from the command line the command to build a dbf. The app invokes just fine and creates a dbf file but does not insert any of the data. there are no errors. I am attaching a small zip file of the xml source and the dbf map file. It would be really great if someone who knows how this works could review and give me some feedback.
Attachments
sampledata.zip
sample xml and dbf map file
(3.24 KiB) Downloaded 2460 times
mbirnholz
 
Posts: 4
Joined: Sun Jul 24, 2016 5:51 pm

Re: Trying to convert an xml into a dbf

Postby Admin » Mon Jul 25, 2016 5:47 pm

Hello,
your map-file is correct - there is a bug in import custom XML feature. It will be fixed in the next release. As a workaround, you can use the previous version of DBF Commander Pro 3.8 available here.
It imports your XML correctly. However, I've edited your map-file to import tags with HTML markup (attached).
Attachments
samplemap.zip
(775 Bytes) Downloaded 2558 times
Best regards,
Oleg Zhechkov
User avatar
Admin
Site Admin
 
Posts: 124
Joined: Wed Apr 21, 2010 7:27 pm

Re: Trying to convert an xml into a dbf

Postby mbirnholz » Mon Jul 25, 2016 6:59 pm

Thanks Oleg - almost there!

The import worked but it skipped two attributes - is it that your parser does not like these escaped html url values?

<ImageURL><![CDATA[http://img.eautopartscatalog.com/live/W01331620896OES.JPG]]></ImageURL>
<ThumbURL><![CDATA[http://img.eautopartscatalog.com/live/thumb/W01331620896OES.JPG]]></ThumbURL>
mbirnholz
 
Posts: 4
Joined: Sun Jul 24, 2016 5:51 pm

Re: Trying to convert an xml into a dbf

Postby mbirnholz » Mon Jul 25, 2016 7:11 pm

i tried the 'real' file wanted to convert and got this error (related to other)

Error: An invalid character was found in text content.

Line: 9450360
<BrandDescription><![CDATA[Novo]]></
Press Enter to continue
mbirnholz
 
Posts: 4
Joined: Sun Jul 24, 2016 5:51 pm

Re: Trying to convert an xml into a dbf

Postby Admin » Mon Jul 25, 2016 10:32 pm

Did you try the map-file I've attached in my previous message? HTML URL values were imported fine on my side using this map-file.
Related to the error - this means that your XML has wrong structure. You can reproduce the error with any web-browser or an XML validation tool. Please correct it first (the error contains line number).
Best regards,
Oleg Zhechkov
User avatar
Admin
Site Admin
 
Posts: 124
Joined: Wed Apr 21, 2010 7:27 pm

Re: Trying to convert an xml into a dbf

Postby mbirnholz » Wed Jul 27, 2016 4:57 pm

yes I did try your map file. My problem with your suggestion is that i have huge xml files to convert. I used a splitter to make them into multiple smaller files and i assume the splitter must have truncated an element. I suppose i have to edit each split and close the tags and treat each split as its own doc...
mbirnholz
 
Posts: 4
Joined: Sun Jul 24, 2016 5:51 pm


Return to DBF Commander Professional

Who is online

Users browsing this forum: No registered users and 2 guests

cron