title: Python XML Serializers
body: <p>Can some recommend an XML serializer that is element or attribute centric, and that doesn't use key-value pairs. </p>
  
  <p>For example, GAE db.model has a to_xml() function but it writes out like this: </p>
  
  <pre><code>  &lt;property name="firstname" type="string"&gt;John&lt;/property&gt;
    &lt;property name="lastname" type="string"&gt;Doe&lt;/property&gt;
    &lt;property name="city" type="string"&gt;Dallas&lt;/property&gt;
    &lt;property name="dateTimeCreated" type="gd:when"&gt;2009-09-30 19:45:45.975270&lt;/property&gt;
  </code></pre>
  
  <p>From what I remember, these are much harder to map in XSLT tools than simple elements/attributes like this:</p>
  
  <p>DESIRED OUTPUT</p>
  
  <pre><code>   &lt;firstname&gt;John&lt;/firstname&gt;
     &lt;lastname&gt;Doe&lt;/lastname&gt;
     &lt;city&gt;Dallas&lt;/city&gt;
     &lt;dateTimeCreated type="gd:when"&gt;2009-09-30 19:45:45.975270&lt;/dateTimeCreated&gt;
  </code></pre>
  
  <p>I just tried the GNOSIS lib, and my first attempt worked, but also created name value pairs something like this: </p>
  
  <pre><code>  &lt;attr name="__coredata__" type="dict" id="4760164835402068688" &gt;
      &lt;entry&gt;
        &lt;key type="string"&gt;firstname&lt;/key&gt;
        &lt;val type="string"&gt;John&lt;/val&gt;
      &lt;/entry&gt;
      &lt;entry&gt;
        &lt;key type="string"&gt;lastname&lt;/key&gt;
        &lt;val type="string"&gt;Doe&lt;/val&gt;
      &lt;/entry&gt; 
      etc... 
  </code></pre>
  
  <p>Thanks,</p>
  
  <p>Neal Walters </p>