Sly,
you need to duplicate them first.
Element objects correspond to concrete elements in the tree since you
can get parent or iterate through the list so you really have to make
two different objects.
Using clone() is an easy way to duplicate. After a case, you can
addContent again.
paul
Le 14-janv.-09 à 08:31,
junk_mail@... a écrit :
> Is it possible to add two nodes with the same name on the same level
> of
> xml file using .addcontent() method?
>
> I'm trying to do so and I get following error:
>
> Exception in thread "main" org.jdom.IllegalAddException: The Content
> already has an existing parent "tree"...
>
> Is there any way to disable that execption and force jdom to create
> two
> nodes with the same name?
_______________________________________________
To control your jdom-interest membership:
http://www.jdom.org/mailman/options/jdom-interest/youraddr@...