title: XML Deserialization and Loose Array Items
body: <p>So I'm working with some XML files that I believe are most likely badly formed, and I'm trying to figure out how and if I can use the XmlSerializer to deserialize this XML into a logical business object.  Let's say I have the following XML file:</p>
  
  <pre><code>&lt;Root&gt;
     &lt;ArrayType1 Name="Bob"/&gt;
     &lt;ArrayType1 Name="Jim"/&gt;
     &lt;ArrayType2 Name="Frank"&gt;
        &lt;SubItem Value="4"/&gt;
     &lt;/ArrayType2&gt;
     &lt;ArrayType2 Name="Jimbo"&gt;
        &lt;SubItem Value="2"/&gt;
     &lt;/ArrayType2&gt;
  &lt;/Root&gt;
  </code></pre>
  
  <p>Now I'd like to create a class that has these three types, Root, ArrayType1 and ArrayType2, but I'd like to get two lists in Root, one containing a collection of ArrayType1 items, and one containing a collection of ArrayType2 items, but it seems that these items need to have some sort of root, for example, I know how to deserialize the following just fine:</p>
  
  <pre><code>&lt;Root&gt;
     &lt;ArrayType1Collection&gt;
        &lt;ArrayType1 Name="Bob"/&gt;
        &lt;ArrayType1 Name="Jim"/&gt;
     &lt;/ArrayType1Collection&gt;
     &lt;ArrayType2Collection&gt;
        &lt;ArrayType2 Name="Frank"&gt;
           &lt;SubItem Value="4"/&gt;
        &lt;/ArrayType2&gt;
        &lt;ArrayType2 Name="Jimbo"&gt;
           &lt;SubItem Value="2"/&gt;
        &lt;/ArrayType2&gt;
     &lt;/ArrayType2Collection&gt;
  &lt;/Root&gt;
  </code></pre>
  
  <p>But how would I deserialize this without the parent ArrayType#Collection elements surrounding the ArrayType# elements?</p>
  
  <p>Will the XML Serializer even allow this at all?</p>