[jdom-interest] why can't the Text be added to a List?
Eugene Wong
01900466r at polyu.edu.hk
Tue Apr 8 10:08:52 PDT 2003
Hi,
I got a problem when using trying to manipulate the content of an Element node. I tried to insert some new text into certain position in the list of content owned by an element object, called e. That's what I want to, as shown below.
List children = e.getMixedContent();
children.add(0, new Text("haha");
Then what I get is an IllegalAddException. It seems that I cannot insert a Text object into the List.
How can I solve this problem, and how can I add text content into the List?
Thanks
Regards,
Eugene
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://jdom.org/pipermail/jdom-interest/attachments/20030409/bdde0280/attachment.htm
More information about the jdom-interest
mailing list