[jdom-interest] Code Submission: org.jdom.output.HTMLOutputter

Jason Hunter jhunter at collab.net
Thu Nov 16 19:26:02 PST 2000

> I specifically wrote HTMLOutputter purely because HTML can't 
> handle CDATA.

Is CDATA the only thing a browser wouldn't understand?  (IOW, would a
browser familiar only with HTML 3.2 be able to take XMLOutputter info
and understand it except for CDATA?)

Also, James, I'd think you would need to call escapeElementEntities()
for the cdata.getText().  To what extent did you test this?

    protected void printCDATASection(
        CDATA cdata, Writer out, int indentLevel) throws IOException {
        indent(out, indentLevel);


P.S.  I'm making escape*Entities() protected from private to enable this
kind of feature for custom XMLOutputter subclasses.

More information about the jdom-interest mailing list