Hi. I've generated code from a schema and I want to unmarshal. I want
to use Unmarshaller.unmarshal(Reader) because the schema does not
have just one top level element. I might encounter several different
top level elements in the XML files I want to unmarshal.
However, when I try this, castor says "The class for the root element
'blahblah' could not be found." Using a mapping file works, but then
I'd have to maintain 2 representations of the same data (the
generated code and the mapping file). It also works to specify the
top-level element using unmarshal(Class, Reader), but only if I know
the top-level element ahead of time - but I won't.
I've tried using the org.exolab.castor.builder.nspackages property,
but this doesn't help and it seems to be for another purpose, anyway.
I have to support existing XML files out there, so it's not an option
to require the same top-level element in the XML files.
Thanks much in advance for any help.
--
Nick Pilch / [EMAIL PROTECTED]
---------------------------------------------------------------------
To unsubscribe from this list please visit:
http://xircles.codehaus.org/manage_email