title: Do not serialize empty strings to XML
body: <p>I've got a library project where object are serialized to XML format for further download by users in ASP.NET application. Additionaly i've used XSD to generate types for serialization. The number of types for serialization is very big. Each type is serialized to its own XML. Some types have string properties, sometimes those properties contains empty strings. During serializations those properties are been serialized to some like this </p>
  
  <pre><code>&lt;propertyName /&gt;
  </code></pre>
  
  <p>So this properties become invalid by XSD (they are not required but have some restrictions like string minimal string length etc.</p>
  
  <p>Is there any way to configure XMLSerializer not no serialize empty strings to empty xml elements for all types that are been serialized.</p>
  
  <p>For serializing I use <code>System.Xml.XmlSerializer</code>.</p>