title: How to deserialize Xml with root than multiple child elements of the same type
body: <p>I'm trying deserialize a xml document that looks like this</p>
  
  <pre><code>&lt;invoices&gt;
    &lt;invoice&gt;2848&lt;/invoice&gt;
    &lt;invoice&gt;2849&lt;/invoice&gt;
    &lt;invoice&gt;2850&lt;/invoice&gt;
    &lt;invoice&gt;2851&lt;/invoice&gt;
    &lt;invoice&gt;2852&lt;/invoice&gt;
  &lt;/invoices&gt;
  </code></pre>
  
  <p>Into a C# object, but I cannot get it to work. I'm using the <code>DataContractSerializer</code></p>
  
  <p>This is what my class looks like:</p>
  
  <pre><code>[DataContract(Name = "invoices", Namespace = "")]
  public class Invoices
  {
      [DataMember(Name = "invoice")]
      public Invoice[] InvoiceIds { get; set; }
  }
  
  [DataContract(Name = "invoice", Namespace = "")]
  public class Invoice
  {
      [DataMember(Name = "invoice")]
      public string Id { get; set; }
  }
  </code></pre>
  
  <p>Of course this does not work. I get this error:</p>
  
  <pre><code>{"Error in line 1 position 24. Expecting state 'Element'.. Encountered 'Text'  with name '', namespace ''. "}
  </code></pre>
  
  <p>I'm not in control of the Xml.</p>