[jdom-interest] Recursively Modifying the JDOM before output.

philip.nelson at omniresources.com philip.nelson at omniresources.com
Mon Jun 4 19:11:49 PDT 2001


> >Maybe it should have been bold.  Anyway, seems like setText() adding
> >before or after child elts feels good to people.  So which: before or
> >after?  :-)
> >
> 
> NO NO NO A THOUSAND TIMES NO! This is not a good idea. It does not 
> feel good to me. The current behavior is by far the most intuitive. 
> We should keep it. If it's really too surprising to people (I don't 
> think it is) then we should delete this method. But JDOM should not 
> be making implicit assumptions about how to intermingle text with 
> child elements.

Though the setText result of destroying the content is unexpected, it's easy
to discover and correct.  I think choosing a way to add text with setText is
worse.  I think we should leave it as it is.



More information about the jdom-interest mailing list