JAXB handles enumerations very well. You don't have to turn it on, per se.
Just use it in your schema, and the validation on marshalling and
unmarshalling will catch it. You would have to tell JAXB to validate,
however.
-----Original Message-----
From: Sam Cheung [mailto:sylcheung_at_hotmail.com]
Sent: Friday, February 13, 2004 3:37 PM
To: users_at_jaxb.dev.java.net
Subject: How does JAXB handle enumeration?
Hi,
Does JAXB generate an C-like enum in Java for each enumeration in the
schema?
By default, I don't think it does it. Is there such a feature? if yes, is
there a way to turn that on?
I believe xmlbeans does it, I am wondering if JAXB can do this also.
Thank you.
<xs:restriction base="xs:string">
<xs:enumeration value="Expired"/>
<xs:enumeration value="Retrieved"/>
<xs:enumeration value="Rejected"/>
<xs:enumeration value="Indeterminate"/>
<xs:enumeration value="Forwarded"/>
</xs:restriction>
_________________________________________________________________
Plan your next US getaway to one of the super destinations here.
http://special.msn.com/local/hotdestinations.armx
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe_at_jaxb.dev.java.net
For additional commands, e-mail: users-help_at_jaxb.dev.java.net
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe_at_jaxb.dev.java.net
For additional commands, e-mail: users-help_at_jaxb.dev.java.net