hello helpful forum,

I have the following XML
<x myAttr="123">
   <y>
      ....data 1...
   </y>
   <y>
      ....data 2...
   </y>
</x>

and the following setup
.split().tokenizeXML("y")

I have a couple of questions
*1*) I would like to split this into two messages:

<x myAttr="123">
   <y>
      ....data 1...
   </y>
</x>

and

<x myAttr="123">
   <y>
      ....data 2...
   </y>
</x>

How could I achieve this? My first thought was that split().tokenizeXML("y",
"x") would do the trick, but apparently not.
I assume the answer is that I have to write my own aggregation strategy, but
then there seems to be no way to use tokenizeXML. The only way to tell split
to use an AggregationStrategy is to use split(expression,
aggregationStrategy).

*2*) How could I prevent the original message to pass through the split?
>From my example, I would like to get only the two splitted messages, not the
original one as an extra bonus. I can see that this is mentioned on
http://camel.apache.org/splitter.html, but I do not see how the
request/reply sample explains this...
In what cases would the original message be interesting? I can not see that
the Splitter EIP advocates such a behaviour?

any help is highly appreciated

--
View this message in context: 
http://camel.465427.n5.nabble.com/Split-how-to-include-parents-in-XML-and-prevent-original-message-tp5714836.html
Sent from the Camel - Users mailing list archive at Nabble.com.

Reply via email to