Java Mailing List Archive

http://www.junlu.com/

Home » Home (12/2007) » JDOM User »

Re: [jdom-interest] Re: Welcome to the "jdom-interest" mailing list

florianwendland@freenet.de

2007-05-02

Replies:

Hi,

you have to detach the Element nabil from moha like this:

 Element nabil2 = (Element)nabil.detach();

Than, you have a parentless Element with which you can generate a new
document.

Good luck.

mohammed lethrech schrieb:
> hi,
> i m new in jdom mailling list, it s my first mail,
> i have a broblem using jdom, i wont to creat a new document from a part
> of an other document
>
> document1:
> <moha>
>   <nabil>
>       <jalal>aida</jalal>
>   </nabil>
> </moha>
>
> i want to have the following document:
> document2:
> <nabil>
>       <jalal>aida</jalal>
> </nabil>
>
>
> i have this folowing problem:
> _
>
> org.jdom.IllegalAddException
>
> _: The _Content_ already has an existing _parent_ "_moha_"
>
> think you a lot
>
>
> ------------------------------------------------------------------------
>
> _______________________________________________
> To control your jdom-interest membership:
> http://www.jdom.org/mailman/options/jdom-interest/youraddr@(protected)
_______________________________________________
To control your jdom-interest membership:
http://www.jdom.org/mailman/options/jdom-interest/youraddr@(protected)
©2008 junlu.com - Jax Systems, LLC, U.S.A.