title: How to remove CDATA from XML in Java and do some conversion?
body: <p>I am trying create Java Servlet which will modify existing XML.</p>
  
  <p>This a part of my orginal XML: </p>
  
  <pre><code>&lt;customfieldvalues&gt;
  &lt;div id="errorDiv" style="display:none;"/&gt;
  &lt;![CDATA[ 
   Vinduer, dører
   ]]&gt;
  &lt;/customfieldvalues&gt;
  </code></pre>
  
  <p>I want to get the following result: </p>
  
  <pre><code>&lt;customfieldvalues&gt;
  &lt;div id="errorDiv" style="display:none;"/&gt;
  Vinduer, d&amp;#248;rer
  &lt;/customfieldvalues&gt;
  </code></pre>
  
  <p>I iterate over the XML structure with:</p>
  
  <pre><code>Document doc = parseXML(connection.getInputStream());
  NodeList descNodes = doc.getElementsByTagName("customfieldvalues");
  for (int i=0; i&lt;descNodes.getLength();i++) {
      Node node = descNodes.item(i);
      // how to ?
  }   
  </code></pre>
  
  <p>So, I need to remove <code>CDATA</code> and convert the content.
  I saw that I can use <a href="http://commons.apache.org/lang/api/org/apache/commons/lang3/StringEscapeUtils.html" rel="nofollow">this</a> for the conversion.</p>