| Converts objects to and from strings, using an XML format for composite objects,
but a simple String rendering for leaf objects. In the latter case, type
information must be maintained separately after serialization if you expect
to be able to reconstruct the object.
This class is a slight kludge until we think of some sensible reform of the
serialization morass. The point is we are really disinclined to construct XML
parsers just to parse, for example, String objects. We also note that the
SAXalizer/DeSAXalizer infrastructure is just not geared up for dealing with
documents where the root node is actually a leaf.
Finally, we note that in every practical case we should be able to determine
on delivery whether a given target property actually *IS* a leaf type or not,
meaning armature such as <string>Yes it's a string</string>
ought* to be unnecessary.
This should all be solved once we move over to some sort of mature framework
like JAXB 2.0 or JiBX.
author: Antranig Basman (antranig@caret.cam.ac.uk) |