dom4j-user  

[dom4j-user] Writing CDATA with XMLWriter

udokrass
Sun, 25 Sep 2005 13:19:17 -0700

Hi,

is it possible to write CDATA-Sections with the XMLWriter instead of the 
HTMLWriter without the CDATA-Tags?
I will write plain XHTML-Files, but without CDATA-Tags.
In the Javadoc about the class HTMLWriter there is following comment:
If isXHTML == true, CDATA sections look like this:
  <myelement><![CDATA[My data]]></myelement>  

 Otherwise, they look like this:
  <myelement>My data</myelement> 

The second thing is what i want, but with XHTML==true :) .

Or is it possible to add an Element to my document which is a String with Tags 
without the surounding CDATA-Tag?
The method addText doesn't support this.

Thanks for all hints.
Regards,

Udo Krass