Skip to Content
0

HCI csv converter, remove blank line between headers and elements

Feb 23, 2017 at 11:18 PM

103

avatar image
Former Member

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,

10 |10000 characters needed characters left 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,

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

0 Answers