title: How to represent null value as empty element with JAXB?
body: <p>My <code>XSD</code> structure is like the below:-</p>
  
  <pre><code>&lt;element name="XYZDate" maxOccurs="1" minOccurs="1" nillable="true" type="date"/&gt;
  </code></pre>
  
  <p>When I set the null value in this field it allow me but at he time of <code>XML</code> Generation from <code>JAXB</code> marshaling it produce the output with </p>
  
  <pre><code>&lt;XYZDate xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:nil="true"/&gt;
  </code></pre>
  
  <p>Whereas in the result I want the out put as <code>&lt;XYZDate/&gt;</code> i.e. do not want the schema and other attribute.<br>
  I get rid of this with the help of using <code>XMLStreamWriter</code> but it produce the complete <code>XML</code> in Single line. I need formatted well formed <code>XML</code>.
  If I need to use <code>IndentingXMLStreamWriter</code> my <code>Java</code> version do not support it and I do not have control over Java Container to change or modify.</p>
  
  <p>Please suggest any solution to form <code>XML</code> Well Formatted.</p>