To use the enum value for the set () operation, you first need to view the enum constant with DynamicJAXBContext.getEnumConstant (), and then use it for the set. For instance:
Object NORTH = ctx.getEnumConstant("your.package.CompassDirection", "NORTH");
person.set("quadrant", NORTH);
To get the value, you call the correct code, but the return value will not be a string, it will be the actual value of the Object enumeration associated with this string. You should use:
Object quadrant = person.get("quadrant");
, ,
Rick