cancel
Showing results for 
Search instead for 
Did you mean: 

File Adapter - File Content Conversion to XML and ; is coming with last field

0 Kudos

Hi Experts,

I am trying to use FCC and want to convert the file data to XML. But after converting the data, the ; (semicolon) symbol is coming with last filed.

Input test file sample -

Header;123;xyz;

So in XML payload, the last field is coming as "xyz;". I want to remove this and don't want to use Mapping here.

Thanks in Advance.

Regards,

Ankur

manoj_khavatkopp
Active Contributor
0 Kudos

Please share your FCC and sample file screenshot.

0 Kudos

Hi Manoj,

Here I am using fieldSeparator as ; and endSeparator as 'nl' in my FCC.

Sample input file - ABC;123;2344;

ABC is key value.

Accepted Solutions (0)

Answers (4)

Answers (4)

iaki_vila
Active Contributor
0 Kudos

Hi Ankhur,

Please mark Evgeniy answer as the correct one, in this way you can help more SCN members in the future. On the other hand, a clever workaround Evgeniy!.

Regards.

former_member190293
Active Contributor
0 Kudos

Hi Inaki!

Thank you very much for your positive feedback!

Regards, Evgeniy.

0 Kudos

Hi All,

This issue is resolved.

regards,

Ankur

former_member190293
Active Contributor
0 Kudos

Hi Ankur!

You should add "dummy" field to your FCC structure definition, not in source file.

Regards, Evgeniy.

0 Kudos

Yes, I am using in FCC parameter and forgot to mention one thing. I want to achieve this in Sender SFTP adapter.

former_member190293
Active Contributor
0 Kudos

Hi Ankur!

Use one more dummy field for your XML structure in FCC and set parameter <Item>.missingLastFields to "Ignore".

Source:

1;2;3;
5;6;7;

Result:

<?xml version="1.0" encoding="utf-8"?><ns:MT_Message xmlns:ns="http://tempuri.org">
<Item><Field1>1</Field1> <Field2>2</Field2> <Field3>3</Field3> </Item> <Item> <Field1>5</Field1> <Field2>6</Field2> <Field3>7</Field3> </Item> </ns:MT_Message>

Regards, Evgeniy.

0 Kudos

Hi Evgeniy,

Thanks for your suggestion.

It is not working in my scenario. Result is same .

former_member190293
Active Contributor
0 Kudos

Please share your FCC parameters.

Regards, Evgeniy.

0 Kudos

sample original input file structure - ABC;123;234;

Then I have added one dummy field at the end. ABC;123;234;dummy

Uded FCC parameters-

1. <item>.fieldsName

2. <item>.fieldsSeparator

3. <Item>.keyFieldValue

4. <Item>.missingLastFields