title: XML Serialization - Disable rendering root element of array
body: <p>Can I somehow disable rendering of root element of collection?</p>
  <p>This class with serialization attributes:</p>
  <pre><code>[XmlRoot(ElementName=&quot;SHOPITEM&quot;, Namespace=&quot;&quot;)]
  public class ShopItem
  {
      [XmlElement(&quot;PRODUCTNAME&quot;)]
      public string ProductName { get; set; }       
      
      [XmlArrayItem(&quot;VARIANT&quot;)]
      public List&lt;ShopItem&gt; Variants { get; set; }
  }
  </code></pre>
  <p>generates this XML:</p>
  <pre class="lang-xml prettyprint-override"><code>&lt;SHOPITEM xmlns:xsi=&quot;http://www.w3.org/2001/XMLSchema-instance&quot; xmlns:xsd=&quot;http://www.w3.org/2001/XMLSchema&quot;&gt;
        &lt;PRODUCTNAME&gt;test&lt;/PRODUCTNAME&gt;
        &lt;Variants&gt;
            &lt;VARIANT&gt;
                &lt;PRODUCTNAME&gt;hi 1&lt;/PRODUCTNAME&gt;
            &lt;/VARIANT&gt;
            &lt;VARIANT&gt;
                &lt;PRODUCTNAME&gt;hi 2&lt;/PRODUCTNAME&gt;
            &lt;/VARIANT&gt;           
        &lt;/Variants&gt;        
  &lt;/SHOPITEM&gt;
  </code></pre>
  <p>I don't want <code>&lt;Variants&gt;</code> element here. What must I do?</p>
  <p>Also I don't need xsi and xsd namespaces in root element...</p>