title: How can I deserialize any xml element to a list via the XmlSerializer?
body: <p>I want to deserialize the following xml document:</p>
  
  <pre><code>&lt;?xml version="1.0" encoding="utf-8"?&gt;
  &lt;ExtensionFileTypes xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema"&gt;
    &lt;Group&gt;
      &lt;Item1&gt;value 1&lt;/Item1&gt;
      &lt;Item2&gt;value 2&lt;/Item2&gt;
      &lt;Item3&gt;value 3&lt;/Item3&gt;
      [ more items ... ]
    &lt;/Group&gt;
  &lt;/ExtensionFileTypes&gt;
  </code></pre>
  
  <p>This document should be parsed to the following c# class:</p>
  
  <pre><code>public class ExtensionFileTypes
  {
      [XmlArrayItem("Item*")]
      public List&lt;string&gt; Group = new List&lt;string&gt;();
  }
  </code></pre>
  
  <p>The wildcard in the parameter of the class attribute <code>[XmlArrayItem("Item*")]</code> demonstrates what I want to archive: pass the xml elements <code>&lt;Item*&gt;</code> to my c# list.</p>
  
  <p>I use the XmlSerializer to deserialize the xml-document:</p>
  
  <pre><code>public static void ReadXML(string pFilename)
  {
      XmlSerializer lXmlSerializer = new XmlSerializer(typeof(ExtensionFileTypes));
  
      lXmlSerializer.UnknownElement += new XmlElementEventHandler(XmlSerializer_UnknownNode);
  
      FileStream lFileStream = new FileStream(pFilename, FileMode.Open);
      ExtensionFileTypes lExtensionFileTypes = (ExtensionFileTypes)lXmlSerializer.Deserialize(lFileStream);
  
      var lFoo = lExtensionFileTypes; // 0 Items in Group
  }
  </code></pre>
  
  <p>Problem: lFoo contains 0 <code>&lt;Item*&gt;</code> elements:</p>
  
  <p><a href="https://i.stack.imgur.com/ybjEu.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/ybjEu.png" alt="enter image description here"></a></p>
  
  <p>How can I get these elements?</p>