[jdom-interest] Element.clone()

Kenworthy, Edward edward.kenworthy at exchange.co.uk
Tue Jun 12 04:51:57 PDT 2001


I'll have to try an alternative strategy for what I want. Thanks.

-----Original Message-----
From: Ken Rune Helland [mailto:kenh at csc.no]
Sent: 12 June 2001 12:52
To: Kenworthy, Edward; JDOM Mailing List (E-mail)
Subject: Re: [jdom-interest] Element.clone()


At 12:20 PM 6/12/2001 +0100, Kenworthy, Edward wrote:
>Does Element.clone() work in a non-obvious way ?
>
>I would expect a cloned element to have the same parent, but it doesn't
>appear to.

An element's clone does not have any parent because it is not in the
original element's parent's content.


Clone gives you a deep copy from the element and down the subtree
the element is the root of.


KenR



More information about the jdom-interest mailing list