Import XML requires comment

Forum for DBF Commander discussing.

Import XML requires comment

Postby brendonosullivan » Tue Oct 29, 2013 9:18 pm

Here is just an observation. It's not a major problem once you know about it, but a little bit strange nonetheless.

Importing XML files requires that there is a comment line. If not then the following error is returned:
Error: Wrong file format!
Error: List index out of bounds (2)


For example the following can be imported:
Code: Select all
<?xml version="1.0" encoding="UTF-8"?>
<!-- Blah Blah -->
<HEAD>
   <FieldDefs>
      <FieldNo_1 Name="c_id" Type="Character(3,0)" Null="False"/>
   </FieldDefs>
   <RecNo_1>
      <Field Name="c_id">001</Field>
   </RecNo_1>
</HEAD>


However the following causes the error:
Code: Select all
<?xml version="1.0" encoding="UTF-8"?>

<HEAD>
   <FieldDefs>
      <FieldNo_1 Name="c_id" Type="Character(3,0)" Null="False"/>
   </FieldDefs>
   <RecNo_1>
      <Field Name="c_id">001</Field>
   </RecNo_1>
</HEAD>

The only difference is the comment line "<!-- Blah Blah -->".

Comments are nice but they should not be compulsory. Also the error message is very cryptic and does not help us to understand what the problem is.
brendonosullivan
 
Posts: 4
Joined: Mon Oct 28, 2013 5:36 pm

Re: Import XML requires comment

Postby Admin » Wed Oct 30, 2013 4:10 pm

Yeah, you're right, thank you. This is abnormal situation. Already fixed.
Best regards,
Oleg Zhechkov
User avatar
Admin
Site Admin
 
Posts: 124
Joined: Wed Apr 21, 2010 7:27 pm


Return to DBF Commander Professional

Who is online

Users browsing this forum: No registered users and 9 guests

cron