title: Deserialize XML Node into a collection getting values from attributes
body: <p>if i have some xml like this</p>
  
  <pre><code>        &lt;SiteSettings&gt;              
              &lt;sortOptions&gt;
                  &lt;add name="By Date" value="date" /&gt;
                  &lt;add name="By Rating" value="rating" /&gt;
              &lt;/sortOptions&gt;
          &lt;/SiteSettings&gt;
  </code></pre>
  
  <p>I'd like to deserialise this into an object like this</p>
  
  <pre><code>[XmlRoot("SiteSettings")]
  public class SerializableSiteSettings
  {
      public List&lt;NameValuePair&gt; SortOptions { get; set; }
  }
  
  public class NameValuePair
  {
      [XmlAttribute("name")]
      public string Name { get; set; }
      [XmlAttribute("value")]
      public object Value { get; set; }
  }
  </code></pre>
  
  <p>I tried adding this to the SortOptions but it did not work</p>
  
  <pre><code>    [XmlArrayItem("actionButtons", typeof(List&lt;NameValuePair&gt;))]
      public List&lt;NameValuePair&gt; ActionButtons { get; set; }
  </code></pre>