[jdom-interest] Merging text nodes
Elliotte Rusty Harold
elharo at metalab.unc.edu
Sat Feb 16 20:00:58 PST 2002
At 7:43 PM -0600 2/16/02, Bradley S. Huffman wrote:
>Just looked at ContentList and it should be fairly easy to do, come
>to think of it the merge should probably be taken out of Element and
>moved to ContentList so Text, CDATA adds are consistent.
>
OK, but if the code's going to go in ContentList then somebody else
is going to need to write it because I don't have a clue what's going
on in there and would feel very uncomfortable messing with its
internals.
Wherever the change is made, the tricky bit is going to be deciding
whether to merge adjacent Text and CDATA nodes. If we do merge them,
do we merge them into a Text node or a CDATA node? Probably the
latter. If someone's deliberately added a CDATA node, then they're
probably more concerned about having it preserved than the text node.
--
+-----------------------+------------------------+-------------------+
| 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