title: The easiest way to populate a collection from XML file in .NET
body: <p>I have the following XML file:</p>
  
  <pre><code>&lt;?xml version="1.0" encoding="utf-8" ?&gt;
  &lt;scripts&gt;
    &lt;ScriptName&gt;
      &lt;name&gt;
          "My Name"
      &lt;/ScriptName&gt;
      &lt;ScriptBody&gt;
          "body contents"
      &lt;/ScriptBody&gt;
    &lt;/script&gt;
  &lt;/scripts&gt;
  </code></pre>
  
  <p>And the following object: </p>
  
  <pre><code>    public class DbScript
  {
      #region Constructors
      public DbScript()
          : this(string.Empty, string.Empty)
      {
      }
      public DbScript(string name, string body)
      {
          ScriptName = name;
          ScriptBody = body;
      }
      #endregion
      #region Properties
      /// &lt;summary&gt;
      /// Script name
      /// &lt;/summary&gt;
      public string ScriptName { get; set; }
      /// &lt;summary&gt;
      /// Script body
      /// &lt;/summary&gt;
      public string ScriptBody { get; set; }
      #endregion
  }
  </code></pre>
  
  <p>What is the quickest way to populate the collection of DBScript object from the contents of the XML file? Should I look into serializers?</p>
  
  <p>Thanks!</p>