I have an XML schema that uses enumerations, but when I look at the generated XML object in Delphi, the enumeration restriction has been dropped. Is there a way to get Delphi to generate an enumeration and build it in an object?
XSD Snippet:
<xs:simpleType name="enumType" final="restriction"> <xs:restriction base="xs:NMTOKEN"> <xs:enumeration value="Each"/> <xs:enumeration value="Units"/> <xs:enumeration value="Area"/> <xs:enumeration value="Payroll"/> <xs:enumeration value="Sales"/> <xs:enumeration value="TotalCost"/> <xs:enumeration value="Other"/> </xs:restriction> </xs:simpleType>
What I expect to see in Delphi is a field that takes an enumeration, which then converts to it, matching a string when generating XML, but this field is a regular string.
xml delphi xsd
LostNomad311
source share