Using JAXB2.0 generated classes, is it possible to differentiate between
these children using generated types etc.? Are there any specific
binding customizations to deal with this situation? Below is an example
of the schema fragment:
<xsd:complexType name="myType">
<xsd:sequence>
<xsd:choice maxOccurs="unbounded">
<xsd:element name="types" type="myClassType"/>
<xsd:element name="config" type="myClassType"/>
<xsd:element name="status" type="myClassType"/>
</xsd:choice>
</xsd:sequence>
</xsd:complexType>
Or is my only option is to use element's name to differentiate between
them? For example when I unmarshal and get an instance of JAXBElement,
how do I know if it's a "types", or "config" or "status" element?
Thanks.