[jdom-interest] to change element text (keeping children)
jhunter at servlets.com
Fri Nov 10 23:19:23 PST 2006
You can call getContent(), loop to find the right Text node, and replace
Munirul Islam wrote:
> I am trying to change the text of an element in a dom keeping its children.
> Here, the setText method changes the text deleting n's children.
> I tried the following code:
> Element m = new Element("Element");
> m = (Element) n.clone();
> ends up giving illegalAddException.
> Does anyone have a solution to this problem?
> Munirul Islam
> PhD Student
> Department of Computer Science
> Wayne State University
> email: munirul at wayne.edu
> To control your jdom-interest membership:
More information about the jdom-interest