Let assume I have a set of arbitrary XML’s that I would like to embed into each other recursively. Is there any technology or framework helping with this? I am looking for something adding, removing and searching XML’s within XML’s.
EDIT
Someone removed the recursion tag from my question. I guess I am not making myself clear. Let’s imagine XML’s represent data structures instances referring each other. Is there a technology/framework handling this?
EDIT II
Someone claims I am not talking about recursion, but about circular references at best. I am not excluding the possibility of having one data structure referencing itself (by instance or by definition, it does not matter). I DO mean recursive as in fractal so to speak, so please stop removing my tag.
No, not out of the box in standard XML. Basically you need to have a mechanism of recording linkage between elements in the final XML document, and then have a savvy marshalling and demarshalling tech to handle the references. This is an object serialization to XML issue, effectively.
Without it, for example, if you were to try and save a circular list, you’d end up having an infinite loop as the tail element returns to the head element and keeps writing. References fix that issue for you.
I believe XStream will do this for you out of the box (if you’re in Java, but you don’t mention that).