Example 2: Header with missing column heading

If a column heading is missing in the CSV files, it is automatically added in the XML output file. By default, the column name assigned is made up of the prefix FIELD_ and the position number of the column. The first column has the position 1.

Entry in CSV file

ORDER NUMBER;POSITION;;MATERIAL;QUANTITY

4711;10;"Harry, ""A"" Williams";Mobile 6600;3

Entry in XML output file

<?xml version="1.0" encoding="ISO-8859-1"?>

<!DOCTYPE eventlist SYSTEM "event.dtd">

<eventlist>

<event>

<attribute type="ORDER NUMBER">4711</attribute>

<attribute type="POSITION">10</attribute>

<attribute type="FIELD_3">Harry, "A" Williams

</attribute>

<attribute type="MATERIAL">Mobile 6600</attribute>

<attribute type="QUANTITY">3</attribute>

</event>

...

</eventlist>

The column heading FIELD_3 is automatically generated in place of the missing column heading in the CSV files.