Skip to Content
0
Former Member
Aug 14, 2020 at 10:31 AM

Payload Transformation in CPI

147 Views Last edit Aug 17, 2020 at 11:35 AM 2 rev

Hello Community,

I want to transform the structure of a Payload like below using an XSLT Transformation or any other way.

Original Payload: (Many Root nodes with the same MessageHeader node)

<root>
<MessageHeader>
...
</MessageHeader>
<RequestMessage>
<MessageHeader/>
...
<RequestMessage>
</root>
<root>
<MessageHeader>
...
</MessageHeader>
<RequestMessage>
<MessageHeader/>
...
<RequestMessage>
</root>

Transformed Payload: One Root Node with One Message Header Node and Many RequestMessage Nodes

<root>
<MessageHeader>
...
</MessageHeader>
<RequestMessage>
<MessageHeader/>
...
<RequestMessage>
<RequestMessage>
<MessageHeader/>
...
<RequestMessage>
</root>

Could you help me please?

Thanks,

Nadir