AshHuq / xml2csv-conv

Automatically exported from code.google.com/p/xml2csv-conv
0 stars 0 forks source link

one or more row missing #10

Open GoogleCodeExporter opened 8 years ago

GoogleCodeExporter commented 8 years ago

In my XML file name bill.xml I have something like this:

<?xml version = '1.0' encoding = 'ISO-8859-2'?>
<BILL date="2013-07-15" nr="24000000009" text="some texts">
<POZ>
<NAME1>FIRST LINE</NAME1>
<NAME2>SECOND LINE</NAME2>
<NAME3></NAME3>
<NAME4></NAME4>
</POZ>
<POZ>
<NAME1>FIRST LINE 2</NAME1>
<NAME2>SECOND LINE 2</NAME2>
<NAME3>THIRD LINE 2</NAME3>
<NAME4></NAME4>
</POZ>
<POZ>
<NAME1>FIRST LINE 3</NAME1>
<NAME2>SECOND LINE 3</NAME2>
<NAME3>THIRD LINE 3</NAME3>
<NAME4></NAME4>
</POZ>
</BILL>

NAME4 is empty in every  positions. After standard command "xml2csv-conv -s ";" 
bill.xml bill.csv" I have output file:

BILL [date];BILL [nr];BILL [text];NAME1;NAME2;NAME3
2013-07-15;24000000009;some texts;FIRST LINE;SECOND LINE;-
2013-07-15;24000000009;some texts;FIRST LINE 2;SECOND LINE 2;THIRD LINE 2

First problem is one record missed in output file, but someone wrote about this 
problem.

Main problem is missing of row NAME4 in output file. 
In my XML file all NAME4 seccions were empty, but in some sytuaction is 
possible to have NEME1, or NAME3 empty.
When I load few csv to excel I will have diferent number of columns. 

Original issue reported on code.google.com by lukas.kr...@gmail.com on 16 Sep 2013 at 12:08