Skip to Content
0

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

Feb 16, 2017 at 10:25 AM

73

avatar image
Former Member

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

10 |10000 characters needed characters left characters exceeded

Please share your FCC and sample file screenshot.

0
Former Member
Manoj K

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.

0
* Please Login or Register to Answer, Follow or Comment.

4 Answers

Evgeniy Kolmakov Feb 16, 2017 at 02:31 PM
0

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.

Show 3 Share
10 |10000 characters needed characters left characters exceeded
Former Member

Hi Evgeniy,

Thanks for your suggestion.

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

0

Please share your FCC parameters.

Regards, Evgeniy.

0
Former Member
Evgeniy Kolmakov

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

0
Evgeniy Kolmakov Feb 16, 2017 at 03:06 PM
0

Hi Ankur!

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

Regards, Evgeniy.


fcc-01.png (13.5 kB)
Show 1 Share
10 |10000 characters needed characters left characters exceeded
Former Member

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

0
avatar image
Former Member Mar 23, 2017 at 11:53 AM
0

Hi All,

This issue is resolved.

regards,

Ankur

Share
10 |10000 characters needed characters left characters exceeded
Iñaki Vila Mar 23, 2017 at 01:07 PM
0

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.

Show 1 Share
10 |10000 characters needed characters left characters exceeded

Hi Inaki!

Thank you very much for your positive feedback!

Regards, Evgeniy.

0