title: Deserialize xml which uses attribute name/value pairs
body: <p>My application receives a constant stream of xml files which are more or less a direct copy of the database record </p>
  
  <pre><code>&lt;record type="update"&gt;
      &lt;field name="id"&gt;987654321&lt;/field&gt;
      &lt;field name="user_id"&gt;4321&lt;/field&gt;
      &lt;field name="updated"&gt;2011-11-24 13:43:23&lt;/field&gt;
  &lt;/record&gt;
  </code></pre>
  
  <p>And I need to deserialize this into a class which provides nullable property's for all columns</p>
  
  <pre><code>class Record {
      public long? Id { get; set; }
      public long? UserId { get; set; }
      public DateTime? Updated { get; set; }
  }
  </code></pre>
  
  <p>I just cant seem to work out a method of doing this without having to parse the xml file manually and switch on the field's <code>name</code> attribute to store the values.
  Is their a way this can be achieved quickly using an XmlSerializer? And if not is their a more efficient way of parsing it manually?</p>
  
  <p>Regards and thanks</p>
  
  <hr>
  
  <p>My main problem is that the attribute <code>name</code> needs to have its value set to a property name and its value as the contents of a <code>&lt;field&gt;..&lt;/field&gt;</code> element</p>