[jdom-interest] Text class in the api

philip.nelson at omniresources.com philip.nelson at omniresources.com
Tue Oct 23 20:00:07 PDT 2001

> I only played with it for 30min-1hr. Give me a few days so I can
> make sure I didn't do anything stupid and covered all bases.

No problem.

> One thing is I remember a post about not wanting to force 
> anyone to use
> Text class if they didn't want to, I however think it should be one
> way or the other, either Element.content has only Text or 
> only String for 
> textual content, but not both.

The intent was to keep all the String based methods.  These strings would be
kept in the content List of Element inside Text objects.  We would provide
methods to directly add Text nodes to an element's content and inside the
list, there would not be any Strings.

As I see it, the only code that should break by this change is if somebody
was working directly with the content returned from getContent() and added
strings themselves or wasn't expecting a Text instance.

More information about the jdom-interest mailing list