[jdom-interest] Recursively Modifying the JDOM before output.
skeens at mobile.rogers.com
Fri Jun 1 14:25:59 PDT 2001
After thinking about it I'm not sure isetText() should even exist or if you want to continue using it then it should be renamed. Otherwise you will be getting this same question regularly. I remember posting it myself. At that time I remember being told setText() was a convenience method. Since then I have never used it...so how convenient is it?
Anyway, what about replaceAll(String) for an alternate method name? It could be overloaded with replaceAll(Element) as well.
From: Jason Hunter <jhunter at collab.net>
Date: Fri, 01 Jun 2001 13:40:55 -0700
To: Gary Montgomery <Gary.Montgomery at G11N.COM>
Subject: Re: [jdom-interest] Recursively Modifying the JDOM before output.
Gary Montgomery wrote:
> So we save <kid/> off to the side with getChildren().
> setText("foo") changes the tree to:
> then after addChildren():
That's one workaround. I'd like to have something better.
We could also just put the text before or after the other content? That
might be less ugly. Perhaps we could be fancy (too fancy?) and set it
at the first non-whitespace text node. As a newbie, what would you
To control your jdom-interest membership:
More information about the jdom-interest