[xsd-users] Enums

Joel Stein jstein at fiveringscapital.com
Tue Jan 26 09:50:08 EST 2010


Hi,

If I have:

                <xs:simpleType name="Gender">
                                <xs:restriction base="xs:string">
                                                <xs:enumeration value="MALE"/>
                                                <xs:enumeration value="FEMALE"/>
                                </xs:restriction>
                </xs:simpleType>

Is there any way to get the string values for "MALE" and "FEMALE" without typing them as a string.  Would it possible to reference these as constants or convert a Gender object to a string?

Thanks!
Joel


More information about the xsd-users mailing list