title: Using XmlSerializer with an array in the root element
body: <p>I have an XML document similar to the following:</p>
  
  <pre><code>&lt;scan_details&gt;
      &lt;object name="C:\Users\MyUser\Documents\Target1.doc"&gt;
          ...
      &lt;/object&gt;
      &lt;object name="C:\Users\MyUser\Documents\Target2.doc"&gt;
          ...
      &lt;/object&gt;
      ...
  &lt;/scan_details&gt;
  </code></pre>
  
  <p>I am hoping to use the <code>System.Xml.Serialization</code> attributes to simplify XML deserialization.  The issue I have is I cannot work out how to specify that the root node contains an array.</p>
  
  <p>I have tried creating the following classes:</p>
  
  <pre><code>[XmlRoot("scan_details")]
  public class ScanDetails
  {
      [XmlArray("object")]
      public ScanDetail[] Items { get; set; }
  }
  
  public class ScanDetail
  {
      [XmlAttribute("name")]
      public string Filename { get; set; }
  }
  </code></pre>
  
  <p>However when I deserialize the XML into the <code>ScanDetails</code> object the <code>Items</code> array remains <code>null</code>.</p>
  
  <p>How do I deserialize an array in a root node?</p>