The point is, that the mapping between serial encoding and application data is
best separated into two stages: encoding and application modeling.
The first is very simple. A minimum of element method specialization is
necessary in order to encode / decode application data and type specialization
is useful as for method dispatching in the second phase. For this purpose it
suffices to declare a relation between java packages and xml namespaces and to
use introspection to map from element name to class. One would have standard
java packages appropriate for and associated with standard elements.
The second (items 3 - 5 in the original note) is more complex. It is also, in
my experience, not to be managed by simply identifying the correct class to
use to decode the stream. The storage issue (5 and your response) is one
example. Another is the issue of (re)integrating xml-encoded data into a data
store. Decoding the data is just the first step. The decoded instance is then
subject to more complex processing - to check its consistency (validation does
not suffice), to translate it into internal form, to bind nominal links to
instance data, etc.
The first stage should not be burdened with the more complex mechanisms which
this second stage requires. It should be kept as simple (and standardizable as
possible). If that is accomplished, then the interface between the application
and the parser can be set between the two phases.