[jdom-interest] Content as a Text Node (was JDOM JSR)

Elliotte Rusty Harold elharo at metalab.unc.edu
Mon May 21 12:11:29 PDT 2001

At 10:47 AM -0500 5/21/01, philip.nelson at omniresources.com wrote:

><off top of my head>
>Should we consider using a different member variable type other than String?
>I guess I am wondering about StringBuffer so that in SAXHandler.characters()
>you could append rather than adding new text nodes if you were still in the
>same contiguous block of characters.  I can't say how often this happens,
>don't know if it's a good idea, but thought I'd throw it out there.  There
>must be some reason that the large documents are taking proportionally so
>much longer to build than the short ones.
></off top of my head>

I'd actually argue we shouldn't depend on char at all because it's 
not Unicode or XML compatible. But this is an implementation issue 
that should be completely hidden by the interface. I'd be happy with 
a quick and dirty version that used String which we could go back and 
optimize later. Let's just make sure the interface doesn't lock us 
into any one implementation.

| Elliotte Rusty Harold | elharo at metalab.unc.edu | Writer/Programmer |
|                  The XML Bible (IDG Books, 1999)                   |
|              http://metalab.unc.edu/xml/books/bible/               |
|   http://www.amazon.com/exec/obidos/ISBN=0764532367/cafeaulaitA/   |
|  Read Cafe au Lait for Java News:  http://metalab.unc.edu/javafaq/ |
|  Read Cafe con Leche for XML News: http://metalab.unc.edu/xml/     |

More information about the jdom-interest mailing list