title: Change the order of elements when serializing XML
body: <p>I need to serialize an Object to XML and back. The XML is fix and I can't change it.
  I fail to generate this structure after <code>bookingList</code>. </p>
  
  <p>How can I "group" these <code>&lt;booking&gt;</code> elements to appear as a LIST and keep <code>&lt;error&gt;</code> &amp; <code>&lt;counter&gt;</code> before this List of <code>&lt;booking&gt;</code> elements.</p>
  
  <p>See my example here:</p>
  
  <p>Structure i need....</p>
  
  <pre><code>&lt;nicexml&gt;
  &lt;key_id&gt;1234567&lt;/key_id&gt;
  &lt;surname&gt;Jil&lt;/surname&gt;
  &lt;name&gt;Sander&lt;/name&gt;
  &lt;station_id&gt;1&lt;/station_id&gt;
  &lt;ownBookings&gt;
      &lt;bookingList&gt;
          &lt;error&gt;&lt;/error&gt;
          &lt;counter&gt;20&lt;/counter&gt;
          &lt;booking&gt;
               &lt;bookingID&gt;1234567890&lt;/bookingID&gt;
          &lt;/booking&gt;
          &lt;booking&gt;
               &lt;bookingID&gt;2345678901&lt;/bookingID&gt;
          &lt;/booking&gt;
      &lt;/bookingList&gt;
  &lt;/ownBookings&gt;
  &lt;/nicexml&gt;
  </code></pre>
  
  <p>Structure i get with C# code below....</p>
  
  <pre><code>&lt;nicexml&gt;
  &lt;key_id&gt;1234567&lt;/key_id&gt;
  &lt;surname&gt;Jil&lt;/surname&gt;
  &lt;name&gt;Sander&lt;/name&gt;
  &lt;station_id&gt;1&lt;/station_id&gt;
  &lt;ownBookings&gt;
      &lt;bookingList&gt;
             &lt;booking&gt;
          &lt;booking&gt;
               &lt;bookingID&gt;1234567890&lt;/bookingID&gt;
          &lt;/booking&gt;
          &lt;booking&gt;
               &lt;bookingID&gt;2345678901&lt;/bookingID&gt;
          &lt;/booking&gt;
               &lt;booking&gt;
          &lt;error&gt;&lt;/error&gt;
          &lt;counter&gt;20&lt;/counter&gt;
      &lt;/bookingList&gt;
  &lt;/ownBookings&gt;
  &lt;/nicexml&gt;
  </code></pre>
  
  <p>C# Code:</p>
  
  <pre><code>using System;
  using System.Xml.Serialization;
  using System.Collections.Generic;
  
  namespace xml_objects_serials
  {
      public class bookings
      {
          public class nicexml
          {
              public string key_id
              { get; set; }
  
              public string surname
              { get; set; }
  
              public string name
              { get; set; }
  
              public int station_id
              { get; set; }
  
              public ownBookings ownBookings
              { get; set; }
  
          }
  
          public class ownBookings
          {
              public bookingList bookingList
              { get; set; }
  
          }
          public class bookingList {
              public string error 
              { get; set; }
              public int counter
              { get; set; }
              public List&lt;booking&gt; booking= new List&lt;booking&gt;();
          }
  
          public class booking
          {
              public int bookingID
              { get; set; }
          }
      }
  </code></pre>