title: Is there any way to force JAVA to print empty CDATA within Elements?
body: <p>I know it's inproper but the company "on the other side", for some reasons, forces us to change such code:</p>
  
  <pre><code>&lt;POZ /&gt;
  </code></pre>
  
  <p>into</p>
  
  <pre><code>&lt;POZ&gt;&lt;!CDATA[[]]&gt;&lt;/POZ&gt;
  </code></pre>
  
  <p>I found <a href="https://stackoverflow.com/questions/15585507/forcing-empty-cdata-elements">Forcing Empty CDATA Elements</a> but it needs an additional XSL file to be attached and this is something I would like to avoid.</p>
  
  <p>I tried trivial</p>
  
  <pre><code>Element poz = new Element("POZ");
  CDATA cdataContent = new CDATA("");
  poz.addContent(cdataContent);
  </code></pre>
  
  <p>but it - of course - generates simple</p>
  
  <pre><code>&lt;POZ /&gt;
  </code></pre>
  
  <p>not the extended version I expect...</p>
  
  <p>Is there a way to force JAVA to generate these CDATA sections within empty Elements?</p>