[jdom-interest] (no subject)

Bradley S. Huffman hip at cs.okstate.edu
Thu Feb 26 20:25:30 PST 2004


"Bradley S. Huffman" writes:

> "Jason Long" writes:
> 
> > Is there a way to take an element and wrap all content with <![CDATA[
> > ]]> with JDOM?  The content is xhtml, but I need to treat it as CDATA
> > for another application.
> 
> Create a Writer or OutputStream.
> Output "<![CDATA[".
> Use XMLOutputter.outputElementContent to output the element's content.
> Output "]]>".

This assumes you element doesn't contain any CDATA descendants, anything else
that might produce a "]]>".

Brad



More information about the jdom-interest mailing list