users@jaxb.java.net

Retrieving substitutionGroup information from JAXBElement

From: Claus Nagel <claus.nagel_at_gmail.com>
Date: Wed, 30 Sep 2009 10:27:56 +0200

Hi all -

in a current project I get JAXBElement<?> objects returned from the
unmarshal method of the JAXB Unmarshaller. In order to correctly
process these objects I need to know whether or not the
xs:substitutionGroup attribute is set for the corresponding xs:element
in the XML Schema document. Is there an easy way to query the
JAXBElement<?> object in order to get this information? Or do I need
to parse the ObjectFactory class using Java reflection? If I have to
parse the ObjectFactory class, does the JAXBElement<?> contain a link
to the proper class (because I have to deal with plenty of
ObjectFactory classes and want to avoid scanning all of them...). Or
is there a completely different approach possible?

Thanks for any suggestions,
Cheers,
Claus