AnsweredAssumed Answered

String concat using groovy or Map function?

Question asked by bhaskara.salapu233712 on Jun 18, 2016
Latest reply on Jun 20, 2016 by Adam Arrowsmith

Hi all I have requirement to loop through the document and concat the values in complex structure and need to delimiter with a space after first field in complex element as shown in below output. does anybody have similar requirement or any one have any idea how to do this in groovy script or in map function?
example:
Input:
<input1>Hi</input1>
<input2>hello</input2>
<input3>how are you</input3>
<ABC>
<A>1<A>
<B>2<B>
<c>3<c>
</ABC>
<ABC>
<A>4<A>
<B>5<B>
<c>6<c>
</ABC>
<ABC>
<A>7<A>
<B>8<B>
<c>9<c>
</ABC>

Output:
<Output1>Hi</Output1>
<Output2>hello</Output2>
<Output3>how are you</Output3>
<X>1 23<X>
<Y>4 56<Y>
<Z>7 89<Z>

Outcomes