cancel
Showing results for 
Search instead for 
Did you mean: 

File Content Conversion help

former_member190543
Participant
0 Kudos

I have posted a question a few days back, but I now have a different problem in file content conversion.

My source XML is as below:

<?xml version="1.0" encoding="UTF-8" ?>

<ns1:MT_test xmlns:ns1="http://test.co.uk">

<REPORT>

<company_number>0000043239</company_number>

<transaction_type>CREATE</transaction_type>

<transaction_date>2011/08/21</transaction_date>

<sales_data>Partners (((119006.258 169077.102), (372718.323 77854.466, 371449.872 70783.383), (382225.17 73214.976, 398410.463 95156.636)))</Partners>

</REPORT>

</ns1:MT_test>

I am using the parameters as below:

Recordset Structure: REPORT

Name: REPORT.addHeaderLine Value: 3

Name: REPORT.headerLine Value: company_number,transaction_type,transaction_date,sales_data

Name: REPORT.fieldSeparator Value: ,

and I am getting the result as below which is good except that now I want the field sales_data to be enclosed between double quotes (") as below:

company_number,transaction_type,transaction_date,sales_data

0000043239,CREATE,2011/08/21,Partners (((119006.258 169077.102), (372718.323 77854.466, 371449.872 70783.383), 382225.17 73214.976, 398410.463 95156.636)))

But I want file like this: (quotes at the beginning and end of one particular field)

company_number,transaction_type,transaction_date,sales_data

0000043239,CREATE,2011/08/21,"Partners (((119006.258 169077.102), (372718.323 77854.466, 371449.872 70783.383), 382225.17 73214.976, 398410.463 95156.636)))"

What should I add?

Thanks in advance.

Thank you.

Accepted Solutions (1)

Accepted Solutions (1)

Shabarish_Nair
Active Contributor
0 Kudos

you need to handle this in your mapping itself. While doing the mapping, create the quotes for your target XML field. The your existing FCC will create the required output.

Answers (2)

Answers (2)

pedro_baroni3
Active Contributor
0 Kudos

Hi Ramesh,

You can concatenate double quotes with a string in the Message Mapping as below:

[http://www.freeimagehosting.net/bb3b8]

Regards.

Pedro Baroni

former_member190543
Participant
0 Kudos

Many thanks guys. I completely forgot about this. I was just thinking about how to do it in content conversion.

Points awarded.

Former Member
0 Kudos

Hi,

use functions Concat and Constant in message mapping.

Fabio