My goal is to process some XML like
And convert it to a List of my beans that could be created with static MyBean.create(String).
Here is a context fragment:
It works quite well when the input message contains some items. But I'm failed to get an empty list when the message doesn't contains any items.
<int:chain input-channel="..." output-channel="...">
<int-xml:xpath-expression expression="/items/item" />
<int-xml:xpath-transformer evaluation-type="STRING_RESULT" xpath-expression="/" />
<int:transformer expression="T(MyBean).create(payload)" />
As far as I understand from code, XPathMessageSplitter throws an exception when the result collection is empty. Is there any way to work around that?