Skip to Content
avatar image
Former Member

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

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

Add comment
10|10000 characters needed characters exceeded

  • Get RSS Feed

4 Answers

  • Feb 16, 2017 at 02:31 PM

    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.

    Add comment
    10|10000 characters needed characters exceeded

    • 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

  • Feb 16, 2017 at 03:06 PM

    Hi Ankur!

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

    Regards, Evgeniy.

    Add comment
    10|10000 characters needed 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.

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

    Hi All,

    This issue is resolved.

    regards,

    Ankur

    Add comment
    10|10000 characters needed characters exceeded

  • Mar 23, 2017 at 01:07 PM

    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.

    Add comment
    10|10000 characters needed characters exceeded