Runtime binding of anyType fields based on element name
I am using the UserAreaType of the hrxml standard. It is defined as:
<xsd:complexType name="UserAreaType"><br /> <xsd:annotation><br /> <xsd:documentation>Allows the implementer to extend the base HR-XML specification.<br /> This is done by defining the additional information in XML Schema and referencing the new schema in the xml instance document throught the use of namespaces. Once this is done the additional information defined there can be carried in the BOD XML instance document.<br /> </xsd:documentation><br /> </xsd:annotation><br /> <xsd:sequence><br /> <xsd:any namespace="##any" processContents="lax" minOccurs="0" maxOccurs="unbounded"/><br /> </xsd:sequence><br /> </xsd:complexType><br />
I created my own type, UserAccountExtType. I plan I inserting elements of these time into the UserArea section. Is it possible to create a custom jaxb binding that binds elements of a particular QName to a given Java type? I'm trying to prevent having these data show up as a plain old DOM node after being unmarshalled.