Hi Bill,

Bill Schoolfield wrote:

> My xml varies quite bit depending on what the end user did (and
> saved) in a prior execution of my program.
> 
> What techniques or best practices are there for discovering what
> objects were instantiated?

If I plan to support multiple XML versions (at least for deserilization) I 
usually write the current version as attribute into the root element and 
keep it at deserialization time in the context so that all converters may 
access it. It might be to late now for your current situation, but for 
future versions of your XML it is handy.

If the XML starts to vary regarding the child elements of an object, I use a 
custom converter that will by default read the new format, but may also 
handle older versions. XStream itself contains some converters that can read 
XML for objects created with an older version of XStream. A simple one doing 
this is the GregorianCalendarConverter, the ServializableConverter is 
another one, but more complex.

> Right now, I have a chain of HashMaps that help me locate objects.
> Is there a better way provided by Xstreams?

Sorry, but I did not understand what you're actually doing here.

- Jörg


---------------------------------------------------------------------
To unsubscribe from this list, please visit:

    http://xircles.codehaus.org/manage_email


Reply via email to