[jdom-interest] setText() to replace children?

guru at stinky.com guru at stinky.com
Wed Jul 11 13:42:02 PDT 2001

On Wed, Jul 11, 2001 at 03:32:16PM -0400, Steven D. Keens wrote:
> But you shouldn't have invalid data.  The parser and your DTD or schema
> should catch that for you.

I don't use DTDs, they just slow things down.

And anyway, even if you do use DTDs, an unchecked exception is not the
right solution.  If the semantics of getText are "will fail if called
on an element with non-text-only children," then that should be
advertised by a checked exception.  But I don't want it to work that
way either, since that would be way too cumbersome.  It should just
return a sensible value either way.

Alex Chaffee                       mailto:alex at jguru.com
jGuru - Java News and FAQs         http://www.jguru.com/alex/
Creator of Gamelan                 http://www.gamelan.com/
Founder of Purple Technology       http://www.purpletech.com/
Curator of Stinky Art Collective   http://www.stinky.com/

More information about the jdom-interest mailing list