Extract enumeration values from xsd schema file in .net
问题 How programmatically extract enumeration constraint values of an element from xsd schema file using .net? for example I'd like to extract 'Audi', 'Golf' and 'BMW' from the following xsd: <xs:element name="car"> <xs:simpleType> <xs:restriction base="xs:string"> <xs:enumeration value="Audi"/> <xs:enumeration value="Golf"/> <xs:enumeration value="BMW"/> </xs:restriction> </xs:simpleType> </xs:element> 回答1: There is an XmlSchema class, but it looks pretty... "fun" to work with. Would xml querying