title: Get name of XmlElementAttribute after deserialization
body: <p>I haven't found any information on this, maybe someone could help.</p>
  
  <p>I have an XML (simplified for convenience):</p>
  
  <pre><code>&lt;content&gt;
    &lt;field1&gt;value&lt;/field1&gt;
    &lt;field2&gt;
      &lt;field3&gt;value&lt;/field3&gt;
    &lt;/field2&gt;
  &lt;/content&gt;
  </code></pre>
  
  <p>I try to deserialize it using such classes:</p>
  
  <pre><code>[XmlRoot("content")]
  public class Content
  {
      [XmlElement]
      public List&lt;Item&gt; Fields { get; set; }
  }
  
  public class Item
  {
  
      [XmlElement]
      public List&lt;Item&gt; Fields { get; set; }
  
      [XmlText]
      public String Value { get; set; }
  }
  </code></pre>
  
  <p>I have two questions:</p>
  
  <ol>
  <li><p>Can I get the actual name of the field? Like <code>[XmlName] string name;</code> in the Item class? Or some kind of an attribute for the class itself? It is not possible to set the node name to "field" and add "type" attribute, for some reasons ;-) While the actual class and serialization process is really complicated, I'd prefer not to implement my own serializer.</p></li>
  <li><p>Can I add a wildcard like [XmlElement("field*")]? I can't test it until I know the answer to the first question, so if there is a better option, I'd love to know it as well.</p></li>
  </ol>
  
  <p>Thanks.</p>