I'm using the XSD listed below and a corresponding XML. Everything works well with dynamic MOXy but I haven't any idea how to access the enum type within java. Any suggestions? Thanks for help.
<?xml version="1.0" encoding="UTF-8"?>
<xs:schema ...>
<xs:element name="person">
<xs:complexType>
<xs:sequence>
<xs:element name="first-name" type="xs:string"/>
<xs:element name="last-name" type="xs:string"/>
<xs:element name="quadrant" type="myns:compass-direction"/>
</xs:sequence>
</xs:complexType>
</xs:element>
<xs:simpleType name="compass-direction">
<xs:restriction base="xs:string">
<xs:enumeration value="NORTH"/>
<xs:enumeration value="SOUTH"/>
<xs:enumeration value="EAST"/>
<xs:enumeration value="WEST"/>
</xs:restriction>
</xs:simpleType>
</xs:schema>
//JAVA code
DynamicEntity person = (DynamicEntity) dynamicJAXBContext.createUnmarshaller().unmarshal(instanceDoc);
String firstName = person.get("firstName");
String lastName = person.get("lastName");
//until here it works well
//but now: how to get and set the value of the "quadrant"?
// following lines do not work
String quadrant=person.get("quadrant);
person.set("quadrant","NORTH");