如何使用 C# 添加“xsi:Enumeration”XSD
这是基本文件 XSD:
<xs:schema xmlns="urn:bookstore-schema"
targetNamespace="urn:bookstore-schema"
xmlns:xs="http://www.w3.org/2001/XMLSchema">
<xs:simpleType name="TagType">
<xs:restriction base="xs:string">
<!--here to add new Enum elements -->
</xs:restriction>
</xs:simpleType>
我想用 c# 得到这个结果:
<xs:schema xmlns="urn:bookstore-schema"
targetNamespace="urn:bookstore-schema"
xmlns:xs="http://www.w3.org/2001/XMLSchema">
<xs:simpleType name="TagType">
<xs:restriction base="xs:string">
<xs:enumeration value="Actor" />
<xs:enumeration value="Productor" />
<xs:enumeration value="Director" />
<xs:enumeration value="Category" />
</xs:restriction>
</xs:simpleType>
谢谢 :)