title: How to omit XML element in C# XML generated from XSD?
body: <p>Minoccurs is 0 in the XSD and nillable is true for an element. </p>
  
  <p>But if I don't set the element value, it takes it as null and the record is blanked out on the server. Is there a way to tell it to omit the element from the output XML when some conditions are satisfied but have it for other cases?</p>
  
  <pre><code> &lt;xs:element name='CLS_CD' minOccurs='0' nillable='true' type='xdv:stringLen20'/&gt;
  </code></pre>