title: Using XML Enumerations with Delphi XML Data Binding Wizard
body: <p>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 any way to get Delphi to generate the enum and build it into the object?</p>
  
  <p>XSD Snippet:</p>
  
  <pre><code>&lt;xs:simpleType name="enumType" final="restriction"&gt;
      &lt;xs:restriction base="xs:NMTOKEN"&gt;
          &lt;xs:enumeration value="Each"/&gt;
          &lt;xs:enumeration value="Units"/&gt;
          &lt;xs:enumeration value="Area"/&gt;
          &lt;xs:enumeration value="Payroll"/&gt;
          &lt;xs:enumeration value="Sales"/&gt;
          &lt;xs:enumeration value="TotalCost"/&gt;
          &lt;xs:enumeration value="Other"/&gt;
      &lt;/xs:restriction&gt;
  &lt;/xs:simpleType&gt;
  </code></pre>
  
  <p>What I would expect to see in Delphi is a field that accepts a enum that is then converted to it's corresponing string when the XML is generated, but that field is just an ordinary string.</p>