How can I retrieve these enumeration types on an xsd simpleType with c#? Here is a sample simple type?
<xs:simpleType name="PaymentType">
<xs:restriction base="xs:string">
<xs:enumeration value="Cash" />
<xs:enumeration value="CreditCard" />
</xs:restriction>
</xs:simpleType>
thank you
Best Answer
You could look at using the Schema Object Model (SOM) as in this code:
This code only works for named simple types though - if you have elements or attributes that contain anonymous simple types then it gets a lot more complicated as you have to walk all the elements and attributes to find simple types that have restriction content with enumeration facets.