title: XmlTextWriter and null strings
body: <p>I want to serialize an object where some of the member variables are of type <code>string</code> and have the value <code>null</code>.
  I use the following code:</p>
  
  <pre><code>        var writer = new XmlTextWriter(stream, Encoding.UTF8);
          writer.Formatting = Formatting.Indented;
  
          var s = new XmlSerializer(typeof(model.GetType()));            
          s.Serialize(writer, model);
  </code></pre>
  
  <p>The strings with value <code>null</code> don't appear in the Xml file (which is obviously intended behavior), although I don't want that. 
  How can I make <code>null</code> strings appear in the Xml file by overriding the <code>XmlTextWriter</code> class?</p>
  
  <p>EDIT: I can't modify the object model that needs to be serialized, so Xml attributes are no option.</p>