Yeah that blog post is excellent.
In the xpath you can set an attribute to determine the result type. So you can set it as a java.lang.String to have a good key for your correlation expression.
But definitely read the blog post. That is why we added a link to it from the Camel Aggregation wiki page
After reading it looks like I need an spring equivalent of
Something like this: