Re: How to add two nodes with the same name on the same level?
Paul Libbrecht <[email protected]>
| Newsgroups | gmane.comp.java.jdom.general |
|---|---|
| Message-ID | <[email protected]> |
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, [email protected] 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/[email protected]
smime.p7s
(application/pkcs7-signature, 2.2 KB) - not displayed