JAXB, downcast an unmarshalled class
- by elgcom
I define two XML type (base and derived types).
<xs:complexType name="ParentType">
...
</xs:complexType>
<xs:complexType name="ChildType">
<xs:complexContent>
<xs:extension base="ParentType">
...
</xs:complexContent>
</xs:complexType>
Now, I have an XML instance of ChildType.
The question, If I once unmarshall the XML into ParentType java object, can I downcast the java object to its subclass of ChildType?
Is that possible to that?
thanks