title: How to use XmlSerializer to remove the level Orders when outputting Customer->Orders->Order
body: <p>I am looking for a suggestion to resolve the following issue:
  I have a requirement to remove a level out of XML when serializing the output. (remove the "Orders" level)
  I am using ASP.NET 4.6 &amp; C#. (not by choice)</p>
  
  <p><strong>here is the Desired Output</strong></p>
  
  <pre><code>&lt;?xml version="1.0"?&gt;
  &lt;Customer xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema"&gt;
    &lt;Name&gt;Fred Flinstone&lt;/Name&gt;
      &lt;Order&gt;
        &lt;Description&gt;Cookies&lt;/Description&gt;
      &lt;/Order&gt;
      &lt;Order&gt;
        &lt;Description&gt;Ice Cream&lt;/Description&gt;
      &lt;/Order&gt;
  &lt;/Customer&gt;
  </code></pre>
  
  <p><strong>here is the current output</strong></p>
  
  <pre><code>&lt;?xml version="1.0"?&gt;
  &lt;Customer xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema"&gt;
    &lt;Name&gt;Fred Flinstone&lt;/Name&gt;
    &lt;Orders&gt;
      &lt;Order&gt;
        &lt;Description&gt;Cookies&lt;/Description&gt;
      &lt;/Order&gt;
      &lt;Order&gt;
        &lt;Description&gt;Ice Cream&lt;/Description&gt;
      &lt;/Order&gt;
    &lt;/Orders&gt;
  &lt;/Customer&gt;
  </code></pre>
  
  <p><strong>Here is the code I used</strong></p>
  
  <pre><code>using System.Collections.Generic;
  using System.IO;
  using System.Xml.Serialization;
  
  public static class Test
  {
      static void Main()
      {
          string fileName = "dataStuff.txt";
          Test.SerializeItem(fileName); 
      }
  
      public static void SerializeItem(string fileName)
      {
          var c = new Customer();
          c.Name = "Fred Flinstone";
          c.Orders = new List&lt;Order&gt;();
  
          var order = new Order();
          order.Description = "Cookies";
          c.Orders.Add(order);
  
          order = new Order();
          order.Description = "Ice Cream";
          c.Orders.Add(order);
  
          FileStream s = new FileStream(fileName, FileMode.Create);
          XmlSerializer oSerialiser = new XmlSerializer(typeof(Customer));
          oSerialiser.Serialize(s, c);
          s.Close();
      }
  }
  
  public class Customer
  {
      public string Name { get; set; }
      public List&lt;Order&gt; Orders{ get; set; }
  }
  
  public class Order
  {
      public string Description { get; set;  }
  }
  </code></pre>
  
  <p>Thank You for your suggestions.</p>
  
  <p>Why must I add a bunch of gibberish to submit?  I want to be succinct/concise.</p>