[jdom-interest] CDATA sections?

Mark Stewart mstewart at atg.com
Fri Jun 2 13:22:03 PDT 2000


Brett,
 
> You're not getting it - JODM doesn't need CDATA to do this:
> 
> Element foo = new Element("foo");
> foo.setContent("<Markup>");
> 
> Done. No need for CDATA. Why do I care? I don't. I just want the content
> to be <Markup>, and that code does it. I'm not sure what is so hard
> about this ;-)
> 
> Outputting handles escaping it, in any way we need to that /ensures/ the
> content is unchanged. Period.

Perhaps _I'm_ not getting it but I think what Kevin is looking for is a
way to *produce* XML documents that can be used elsewhere (like editors
and such where you don't want anything escaped since it may need to
edited again by a human who wouldn't). It's not that JDOM needs CDATA,
it's that other apps do.

Hoping this reduces rather than increases the confusion,
::mark

P.S. Just read K.C. Jones' post on this and I think he's got it exactly
right.


> 
> -Brett
> 
> > much more efficient, and much more aesthetically pleasing
> > to use a CDATA section, rather than escaping the entire
> > segment.
> >
> > --Kevin



More information about the jdom-interest mailing list