title: How to serialize an c# object into xml without schema info?
body: <p>This is what I did:</p>
  
  <p>A Serializable class:</p>
  
  <pre><code>[Serializable()]
  public class Ticket
  {
      public string   CitationNumber { get; set; }
      public decimal Amount { get; set; }
  }
  </code></pre>
  
  <p>Then serialize a model into xml:</p>
  
  <pre><code>var model = cart.Citations
      .Select(c =&gt; new Ticket(c.Number, c.Amount)).ToList();
  var serializer = new XmlSerializer(typeof (List&lt;Ticket&gt;));
  var sw = new StringWriter();
  serializer.Serialize(sw, model);
  return sw.ToString();
  </code></pre>
  
  <p>The output <code>sw.ToString()</code> is like</p>
  
  <pre><code>&lt;?xml version="1.0" encoding="utf-16"?&gt;
  &lt;ArrayOfTicket xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema"&gt;
  &lt;Ticket&gt;
  &lt;CitationNumber&gt;00092844&lt;/CitationNumber&gt;
  &lt;Amount&gt;20&lt;/Amount&gt;
  &lt;/Ticket&gt;
  &lt;/ArrayOfTicket&gt;  
  </code></pre>
  
  <p>Is there a way to customize the <code>Serialize()</code> output to remove those schema info like: <code>&lt;?xml version="1.0" encoding="utf-16"?&gt;</code> and <code>xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema"</code>?</p>
  
  <p>And how can I change the root element <code>ArrayOfTicket</code> into something else? </p>
  
  <p>Do I have control with those output?</p>