[jdom-interest] CDATA class inconsistencies

Elliotte Rusty Harold elharo at metalab.unc.edu
Sat Feb 16 19:57:16 PST 2002


At 10:24 PM -0500 2/16/02, Alex Rosen wrote:
>>  2. Shouldn't CDATA be a subclass of Text? The JDOM methods are almost
>>  all the same. I can imagine many aplications not caring about the
>>  difference.
>
>I agree - or just have one Text class, with a switch to tell XMLOutputter
>whether to output it as a CDATA section or a plain text node.
>

That makes sense, and it sounds awfully familiar. I suspect it's been 
suggested before and that the only reason we have two classes now is 
that the CDATA class got added when we were still using Strings for 
text nodes.
-- 

+-----------------------+------------------------+-------------------+
| Elliotte Rusty Harold | elharo at metalab.unc.edu | Writer/Programmer |
+-----------------------+------------------------+-------------------+
|          The XML Bible, 2nd Edition (Hungry Minds, 2001)           |
|              http://www.ibiblio.org/xml/books/bible2/              |
|   http://www.amazon.com/exec/obidos/ISBN=0764547607/cafeaulaitA/   |
+----------------------------------+---------------------------------+
|  Read Cafe au Lait for Java News:  http://www.cafeaulait.org/      |
|  Read Cafe con Leche for XML News: http://www.ibiblio.org/xml/     |
+----------------------------------+---------------------------------+



More information about the jdom-interest mailing list