title: XML Serialization and namespace prefixes
body: <p>I'm looking for a way with C# which I can serialize a class into XML and add a namespace, but define the prefix which that namespace will use.</p>
  
  <p>Ultimately I'm trying to generate the following XML:</p>
  
  <pre class="lang-xml prettyprint-override"><code>&lt;myNamespace:Node xmlns:myNamespace="..."&gt;
    &lt;childNode&gt;something in here&lt;/childNode&gt;
  &lt;/myNamespace:Node&gt;
  </code></pre>
  
  <p>I know with both the <code>DataContractSerializer</code> and the <code>XmlSerializer</code> I can add a namespace, but they seem to generate a prefix internally, with something that I'm not able to control. Am I able to control it with either of these serializers (I can use either of them)?</p>
  
  <p>If I'm not able to control the generation of the namespaces will I need to write my own XML serializer, and if so, what's the best one to write it for?</p>