title: Autogenerate DTO elements when loading an XML for Deserialization
body: <p>Suggest me a proper solution for autogenerating DTO elements when loading a proper XML for Deserialization.</p>
  
  <p>This is my DTO</p>
  
  <pre><code>using System;
  using System.Collections.Generic;
  using System.Linq;
  using System.Text;
  using System.Xml.Serialization;
  
  namespace GHelper.DTO
  {
      public class ElementsDTO
      {
          [XmlRoot("GalLC")]
          public class FareBB
          {
              [xmlElement("Ip")]
              public string strIp { get; set; }
              [xmlElement("Port")]
              public int intPort { get; set; }
              [xmlElement("Type")]
              public int intPort{ get; set; }
              [xmlElement("Email")]
              public string strEmail{ get; set; }
          }
      }
  }
  </code></pre>
  
  <p>Here is my XML</p>
  
  <pre><code>&lt;GalLC&gt;
      &lt;Ip&gt;192.168.2.100&lt;/Ip&gt;
      &lt;Port&gt;5051&lt;/Port&gt;
      &lt;Type&gt;&lt;/Type&gt;
      &lt;Email&gt;&lt;/Email&gt;
  &lt;/GalLC&gt;
  </code></pre>
  
  <p>The problem is: when i am getting a lengthy XML, I will consume lots of time to create a DTO for it.
  Please suggest me something about creating a DTO automatically. </p>