title: How can I skip xml declaration when serializing?
body: <p>I'm trying to output a xml file without xml head like 
  I tried:</p>
  
  <pre><code>Type t = obj.GetType();
  XmlSerializer xs=new XmlSerializer(t);
  XmlWriter xw = XmlWriter.Create(@"company.xml",
                                          new XmlWriterSettings() { OmitXmlDeclaration = true, Indent = true });
  xs.Serialize(xw,obj);
  xw.Close();
  </code></pre>
  
  <p>But it's still outputing  in the xml file.
  I don't want string tricks. Any ideas?</p>