[jdom-interest] Recursively Modifying the JDOM before output.
Gary.Montgomery at G11N.COM
Fri Jun 1 13:35:56 PDT 2001
> > This works, but I sure would like to understand why
> setText() causes element
> > to loose it's children. Or if there is something
> > else going on here, what it is.
> Picture this:
> Here is some text
> Here is more text
> getText() returns "\n Here is some text\n \n Here is more text".
> Now, what should setText("foo") do to the tree?
Ah, I see. Makes sense.
So we save <kid/> off to the side with getChildren(). setText("foo") changes
then after addChildren():
More information about the jdom-interest