Hi Venkatesh,
Venkatesh wrote:
> Jorg:
>
> Thanks for replying back to me. The problem I have is that the client that
> is constructing the XML is generating the XML without the "class" hints
> you have outlined in your example (so information about what concrete
> class is
> embedded in the xml is not present). Hope that clarifies the problem I am
> trying to see if there is a solution for?
Point is that XStream is "from Java to XML and back", i.e. it ensures that
all required information is present to deserialize an equivalent object
graph again.
In your XML this information is simply not available for XStream, so it is
up to *you* to take proper action. You can register a custom converter that
will handle all objects that implement MyInterface and you have to decide in
its deserialization method (e.g. based on the name of the first child
element) what instance has to be created.
Regards,
Jörg
---------------------------------------------------------------------
To unsubscribe from this list, please visit:
http://xircles.codehaus.org/manage_email