cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

CSV File Content Conversion

Former Member
0 Likes
1,965

Hello, I have a litte problem with the File-Adapter and the File Content Conversion.

We get csv-files in which are 2 structures

the first row contents headerinformations like invoicenumber and sumfields.

The following rows contents item-informations.

I want to convert the file in a xml-format like this:

<invoice>

<invoiceheader>

.... (information from the first row)

</invoiceheader>

<itemlist>

<item>

... (information from 2. row )

</item>

<item>

... (information from 3. row )

</item>

....

<item>

... (information from last row )

</item>

</itemlist>

</invoice>

The csv-file looks like this:

In the csv-file i have no keys which determine the kind of row. I only know that the first row contains the headerinformation and the following rows (2. until last) contains the item informations.

Any idea ?

Kindly regards

Detlef Breitwieser

View Entire Topic
Former Member
0 Likes

Hi,

Please have a look at the blogs mentioned below:

/people/venkat.donela/blog/2005/06/08/how-to-send-a-flat-file-with-various-field-lengths-and-variable-substructures-to-xi-30

/people/arpit.seth/blog/2005/06/02/file-receiver-with-content-conversion

/people/anish.abraham2/blog/2005/06/08/content-conversion-patternrandom-content-in-input-file

/people/michal.krawczyk2/blog/2004/12/15/how-to-send-a-flat-file-with-fixed-lengths-to-xi-30-using-a-central-file-adapter

your data type should look like :

Invoice

Invoiceheader

invoicenum

field1...

Itemlist

item (0 to unbounded)

Please revert back for further clarifications.

Good Luck.

Priyanka