It appears to me that the Java XStream library does not support cross-delegation. Am I correct in this belief?
So, I can explain what I mean, consider the following example:
<node-type-x>
<node-type-y>
<a/>
<b/>
</node-type-y>
<node-type-y>
<c/>
<d/>
Let's say we have a converter for "node-type-x" nodes and another converter for "node-type-y" nodes. The functionality I would like to see in XStream would be sometype of delegate() method which I could call within the node-type-x converter that would identify nested node-type-y nodes and delegate unmarshalling to the converter for such nodes and return the result so that the node-type-x converter can process the result as needed. As it stands, XStream seems to require that the converter for "node-type-x" handle processing of all children of such nodes.
Two simple ways to do this: