title: Deserialize Xml Using Same Object With root element and child element
body: <p>I have a scenario where the root element and child element has same attribute, due to this i am facing issue on retrieving the value. </p>
  
  <p><strong>Sample XML</strong></p>
  
  <pre><code>&lt;entry&gt;
  &lt;building id='12345asdf'&gt;
  &lt;home/&gt;
  &lt;constructiondate id='6789jklh'&gt;&lt;/constructiondate&gt;
  &lt;yearbuilt id='4569uiop'&gt;&lt;/yearbuilt&gt;
  &lt;/building&gt;
  &lt;/entry&gt;
  </code></pre>
  
  <p>I am trying to deserialize the above Sample XML to the class object building.</p>
  
  <pre><code>[XmlType("building")]
  public class Building
  {
  [XmlAttribute("id")]
  public string Id { get; set; }
  public string home{get; set; }
  public string constructiondate {get; set; }
  public string yearbuilt {get; set; }
  }
  </code></pre>
  
  <p>But, after deserialization the value id always pointing to <strong>'4569uiop'</strong> last value of id attribute in the xml node.</p>
  
  <p><strong>Expected value:</strong>
  The value should always retrieve it from the building id attribute.
  <strong>id=12345asdf.</strong></p>
  
  <p>Please help &amp; Thanks in Advance. </p>