[jdom-interest] Merging text nodes

Elliotte Rusty Harold elharo at metalab.unc.edu
Sat Feb 16 22:33:34 PST 2002

At 11:30 PM -0600 2/16/02, Bradley S. Huffman wrote:

>I not suggesting anything complicated just a convenience to make
>Element.getText a little more useful by giving developers a easy way to map
>EntityRef names to the String they want inserted in the result String.

If we chose to do this, the only sensible place to do it would be the 
EntityRef class. There's no reason to put this logic in Element or 

>default would be to wrap EntityRef name in &; like XMLOutputter. But if they
>provide a Map that maps String->Object then Object.toString is used.
>Maintaining the Map and it's contents would be their responsiblity.

A String is insufficient. Entity references may point to a lot more 
than strings.

| 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