cancel
Showing results for 
Search instead for 
Did you mean: 

How to split XML into small messages and merge back to a single XML

gabe_f
Explorer
0 Kudos

I have a requirement where to need to split a large XML file, make a decision, and merge back to one XML per the result.

Here is the format

CSV to XML - Incoming XML

<XML_File>

<File>

</A>

</File>

<File>

</A>

</File>

<File>

</B>

</File>

<File>

</B>

</File>

</XML_File>

General Split - by Xpath //File so a decsion could be made

Route 1 if the Xpath condtion = A

Route 2 if the Xpath condition = B

==> I need to Merge or combine the result back into one XML file

Not able to achieve this via gather or aggregator function after routing.

Desired output for Route A

<XML_file>

<File>

</A>

</File>

<File>

</A>

</File>

</XML_file>

Same for Route B

Any help or suggestion is appreciated. 

Accepted Solutions (1)

Accepted Solutions (1)

Sriprasadsbhat
Active Contributor

Hello Gabriel,

Below blog will help you to achieve the above.

https://blogs.sap.com/2018/09/01/how-to-copy-data-across-multiple-branches-of-multicast-in-sap-cpi/

Regards,

Sriprasad Shivaram Bhat

gabe_f
Explorer
0 Kudos

The blog, especially the filter expression helped a lot. Thank you!

Answers (0)