Hi Stephan

I think that javadoc needs tidying up a bit ;-)

Firstly all nodes are Cloneable which create a deep copy of themselves
(detach()'ed from their parent). The main difference with createCopy() is
that it is only avaliable on Element and is overloaded to allow you to
change the element's name on the copy. Also the createCopy() method is
typesafe (no cast required) and it will never throw a
CloneNotSupportedException.

James
----- Original Message -----
From: <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Monday, March 25, 2002 5:16 PM
Subject: [dom4j-user] Copy and Clone?


> Dear all
>
> I have some problems in understanding the difference between the
createCopy and
> the clone method.
>
> This is copied (cloned?) form the cookbook:
> "The difference between createCopy(...) and clone() is that first is a
> polymorphic method that created a decoupled deep copy whereas clone()
returns a
> deep copy of the current document or element itself."
>
> Could you please put this in other words. Sorry if it seems a trivial
question
> (but sometimes I have a block)
>
> Thanks
> Stephan
>
>
>
> ----------------------------------------------------------------------
> The contents of this communication are confidential to the normal user of
> the email address to which it was sent.  If you have received this email
> in error, any use, dissemination, forwarding, printing or copying of this
> email is strictly prohibited.  If this is the case, please notify the
> sender and delete this message.
> ----------------------------------------------------------------------
>
>
> _______________________________________________
> dom4j-user mailing list
> [EMAIL PROTECTED]
> https://lists.sourceforge.net/lists/listinfo/dom4j-user


_______________________________________________
dom4j-user mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/dom4j-user

Reply via email to