title: XML Serialize boolean as 0 and 1
body: <p>The XML Schema Part 2 specifies that an instance of a datatype that is defined as boolean can have the following legal literals {true, false, 1, 0}.
  The following XML, for example, when deserialized, sets the boolean property "Emulate" to <code>true</code>.</p>
  
  <pre><code>&lt;root&gt;
      &lt;emulate&gt;1&lt;/emulate&gt;
  &lt;/root&gt;
  </code></pre>
  
  <p>However, when I serialize the object back to the XML, I get <code>true</code> instead of the numerical value. My question is, is there a way that I can control the boolean representation in the XML?</p>