parentNode
is null
) and no user data. User data associated to the imported node is not carried over. However, if any UserDataHandlers
has been specified along with the associated data these handlers will be called with the appropriate parameters before this method returns. Element
copies all attributes and their values, including those generated by the XML processor to represent defaulted attributes, but this method does not copy any children it contains unless it is a deep clone. This includes text contained in an the Element
since the text is contained in a child Text
node. Cloning an Attr
directly, as opposed to be cloned as part of an Element
cloning operation, returns a specified attribute (specified
is true
). Cloning an Attr
always clones its children, since they represent its value, no matter whether this is a deep clone or not. Cloning an EntityReference
automatically constructs its subtree if a corresponding Entity
is available, no matter whether this is a deep clone or not. Cloning any other type of node simply returns a copy of this node. EntityReference
clone are readonly . In addition, clones of unspecified Attr
nodes are specified. And, cloning Document
, DocumentType
, Entity
, and Notation
nodes is implementation dependent.
@param deep If true
, recursively clone the subtree under the specified node; if false
, clone only the node itself (and its attributes, if it is an Element
).
@return The duplicate node.
Creates a clone of this node.
When cloning, it can be specified whether we want to clone also the available preprocessing information (the lists of processors that should be applicable to each node), and also the new parent to be assigned to the DOM tree resulting from cloning (parent can be null).
Node cloning is always performed in depth.
@param newParent the new parent node of the resulting cloned DOM tree, if any (can be specifiedas null). @param cloneProcessors whether the lists of applicable processors for each node shouldalso be cloned or not. @return the cloned node.parentNode
returns null
.). Element
copies all attributes and their values, including those generated by the XML processor to represent defaulted attributes, but this method does not copy any text it contains unless it is a deep clone, since the text is contained in a child Text
node. Cloning any other type of node simply returns a copy of this node. EntityReference
clone are readonly.
@param deep If true
, recursively clone the subtree under the specified node; if false
, clone only the node itself (and its attributes, if it is an Element
).
@return The duplicate node.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|