users@jaxb.java.net

Re: Anonymous simple types as enums?

From: Felipe Gaúcho <fgaucho_at_gmail.com>
Date: Wed, 25 Feb 2009 16:01:39 +0100

remove the element tag.. use only the simple type, like in this example:

>                <xsd:simpleType name="Product">
>                        <xsd:restriction base="xsd:string">
>                                <xsd:enumeration value="Product1"/>
>                                <xsd:enumeration value="Product2"/>
>                                <xsd:enumeration value="Product3"/>
>                        </xsd:restriction>
>                </xsd:simpleType>

and then jaxb will generate an Enum..