Skip to Content
avatar image
Former Member

HCI csv converter, remove blank line between headers and elements

I added to the XSLT Mapping file a customize header, example:

<Records>

<Header>

<H1>Customize Header</H1>

</Header>

<Elements>

<Value1>Value 1</Value1>

</Elements>

</Records>

But when i use the XML to CSV converter the iflow gives me a .csv file with a blank line between the header (Customize Header) and the elements (Value1).

CSV File output:

Customize Header

------Blank line-----

Value 1

Is there a way to remove the blank line?

Regards,

Add comment
10|10000 characters needed characters exceeded

  • Former Member

    I already resolved this issue i put an script after the xml to csv converter with this code:

    import com.sap.gateway.ip.core.customdev.util.Message;

    import java.util.HashMap;

    def Message processData(Message message) {

    def body = message.getBody(String.class);

    body = body.replaceAll("[\n]","");

    message.setBody(body);

    return message;

    }

    Kind Regards,

  • Get RSS Feed

0 Answers