title: Convert single XElement to object
body: <p>I have a single <code>XElement</code> looking like this:</p>
  
  <pre class="lang-xml prettyprint-override"><code>&lt;row flag="1" sect="" header="" body="" extrainfo="0" /&gt;
  </code></pre>
  
  <p>Then I have a class looking like this:</p>
  
  <pre><code>public class ProductAttribute
  {
      public string Flag { get; set; }
      public string Sect { get; set; }
      public string Header { get; set; }
      public string Body { get; set; }
      public string Extrainfo { get; set; }
  }
  </code></pre>
  
  <p>How can I convert this <code>XElement</code> into a <code>ProductAttribute</code> object?</p>