...
You can of course use many different Expression languages such as XPath, XQuery, SQL or various Scripting Languages.
Here is an example using XPath:
Code Block |
---|
//aggregate based on the message content using an XPath expression
//example assumes an XML document starting with <stockQuote symbol='APACHE'>
from("seda:start").aggregate().xpath("name(/stockQuote[@symbol='APACHE'])", String.class).batchSize(5).to("mock:result");
|
For further examples of this pattern in use you could look at the junit test case
...