[jdom-interest] Text class in the api

philip.nelson at omniresources.com philip.nelson at omniresources.com
Mon Oct 22 18:36:39 PDT 2001


The problem with building the files from html content may also be a good
excuse to put the Text class to work.  A further optimization in SAXBuilder
would be to keep the last Text node for the current element and append to it
as successive calls to characters() occur, but still accounting for mixed
content.  This combined with a Text.append(char[], int, int method) *should*
improve performance and memory use in some cases.  Element would have an
addContent(Text) method added.  

There are other ways to do this of course, but I think using a Text class
has advantages.  We might consider implementing the Text internal storage as
char[] instead of String or StringBuffer.  By doing this, we could get the
fast(er) append functionality of StringBuffer but near the efficiency of
String which would still be the most common use case.

Do we want to go forward with implementing the Text class?  I think we
should make a decision one way or the other on it.  I am in favor of it FYI
and it's now or never for all practical purposes as a 1.0 release shouldn't
be that far off.

As before, HELP WANTED!



More information about the jdom-interest mailing list