title: How to output a CDATA section from a Sax XmlHandler
body: <p>This is a followup question of <a href="https://stackoverflow.com/questions/156697/how-to-encode-characters-from-oracle-to-xml">How to encode characters from Oracle to Xml?</a></p>
  
  <p>In my environment here I use Java to serialize the result set to xml. I have no access to the output stream itself, only to a org.xml.sax.ContentHandler.</p>
  
  <p>When I try to output characters in a CDATA Section:</p>
  
  <p>It happens basically like this:</p>
  
  <pre><code>xmlHandler.startElement(uri, lname, "column", attributes);
  String chars = "&lt;![CDATA["+rs.getString(i)+"]]&gt;";
  xmlHandler.characters(chars.toCharArray(), 0, chars.length());
  xmlHandler.endElement(uri, lname, "column");
  </code></pre>
  
  <p>I get this:</p>
  
  <pre><code>&lt;column&gt;&amp;lt;![CDATA[33665]]&amp;gt;&lt;/column&gt;
  </code></pre>
  
  <p>But I want this:</p>
  
  <pre><code>&lt;column&gt;&lt;![CDATA[33665]]&gt;&lt;/column&gt;
  </code></pre>
  
  <p>So how can I output a CDATA section with a Sax ContentHandler?</p>