title: How to serialize list to XML without parent element
body: <p>I'm using <code>System.Xml.Serialization.XmlSerializer</code> to serialize my class into a XML document.
  These are my classes:</p>
  
  <pre><code>public class Test
  {
      public List&lt;ListItem&gt; ListItems { get; set; }
      [XmlAttribute]
      public String Name { get; set; }
      [XmlAttribute]
      public String ID { get; set; }
  
      public Scenario()
      {
          this.ListItems = new List&lt;ListItem&gt;();
      }
  }
  
  public class ListItem
  {
      public String Name { get; set; }
  }
  </code></pre>
  
  <p>and this is the XML that I get:</p>
  
  <pre><code>&lt;?xml version="1.0"?&gt;
  &lt;Test xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"&gt;
    &lt;ListItems&gt;
      &lt;ListItem&gt;
        &lt;Name&gt;test1&lt;/Name&gt;
      &lt;/ListItem&gt;
      &lt;ListItem&gt;
        &lt;Name&gt;test2&lt;/Name&gt;
      &lt;/ListItem&gt;
    &lt;/ListItems&gt;
  &lt;/Test&gt;
  </code></pre>
  
  <p>Is it possible to get XML like this:</p>
  
  <pre><code>&lt;?xml version="1.0"?&gt;
  &lt;Test xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"&gt;
    &lt;ListItem&gt;
      &lt;Name&gt;test1&lt;/Name&gt;
    &lt;/ListItem&gt;
    &lt;ListItem&gt;
      &lt;Name&gt;test2&lt;/Name&gt;
    &lt;/ListItem&gt;
  &lt;/Test&gt;
  </code></pre>
  
  <p>Notice that in second Xml example (the one that I need to generate) <code>ListItem</code> nodes do not have parent <code>ListItems</code> node.</p>