public abstract class ChildNode extends NodeImpl
| Modifier and Type | Field and Description |
|---|---|
protected ChildNode |
nextSibling
Next sibling.
|
protected ChildNode |
previousSibling
Previous sibling.
|
DOCUMENT_POSITION_CONTAINS, DOCUMENT_POSITION_DISCONNECTED, DOCUMENT_POSITION_FOLLOWING, DOCUMENT_POSITION_IMPLEMENTATION_SPECIFIC, DOCUMENT_POSITION_IS_CONTAINED, DOCUMENT_POSITION_PRECEDING, ELEMENT_DEFINITION_NODE, FIRSTCHILD, flags, HASSTRING, ID, IGNORABLEWS, NORMALIZED, OWNED, ownerNode, READONLY, SPECIFIED, SYNCCHILDREN, SYNCDATAATTRIBUTE_NODE, CDATA_SECTION_NODE, COMMENT_NODE, DOCUMENT_FRAGMENT_NODE, DOCUMENT_NODE, DOCUMENT_POSITION_CONTAINED_BY, DOCUMENT_TYPE_NODE, ELEMENT_NODE, ENTITY_NODE, ENTITY_REFERENCE_NODE, NOTATION_NODE, PROCESSING_INSTRUCTION_NODE, TEXT_NODE| Modifier | Constructor and Description |
|---|---|
protected |
ChildNode(CoreDocumentImpl ownerDocument)
No public constructor; only subclasses of Node should be
instantiated, and those normally via a Document's factory methods
|
| Modifier and Type | Method and Description |
|---|---|
Node |
cloneNode(boolean deep)
Returns a duplicate of a given node.
|
Node |
getNextSibling()
The next child of this node's parent, or null if none
|
Node |
getParentNode()
Obtain the DOM-tree parent of this node, or null if it is not
currently active in the DOM tree (perhaps because it has just been
created or removed).
|
Node |
getPreviousSibling()
The previous child of this node's parent, or null if none
|
addEventListener, appendChild, changed, changes, compareDocumentPosition, dispatchEvent, getAttributes, getBaseURI, getChildNodes, getFeature, getFirstChild, getLastChild, getLength, getLocalName, getNamespaceURI, getNodeName, getNodeNumber, getNodeType, getNodeValue, getOwnerDocument, getPrefix, getReadOnly, getTextContent, getUserData, getUserData, getUserDataRecord, hasAttributes, hasChildNodes, insertBefore, isDefaultNamespace, isEqualNode, isSameNode, isSupported, item, lookupNamespaceURI, lookupPrefix, needsSyncChildren, normalize, removeChild, removeEventListener, replaceChild, setNodeValue, setOwnerDocument, setPrefix, setReadOnly, setTextContent, setUserData, setUserData, synchronizeData, toStringprotected ChildNode previousSibling
protected ChildNode nextSibling
protected ChildNode(CoreDocumentImpl ownerDocument)
Every Node knows what Document it belongs to.
ownerDocument - the owner documentpublic Node cloneNode(boolean deep)
Note: since we never have any children deep is meaningless here, ParentNode overrides this behavior. Returns a duplicate of a given node. You can consider this a generic "copy constructor" for nodes. The newly returned object should be completely independent of the source object's subtree, so changes in one after the clone has been made will not affect the other.
Note: since we never have any children deep is meaningless here, ParentNode overrides this behavior.
cloneNode in interface NodecloneNode in class NodeImpl
Example: Cloning a Text node will copy both the node and the text it
contains.
Example: Cloning something that has children -- Element or Attr, for
example -- will _not_ clone those children unless a "deep clone"
has been requested. A shallow clone of an Attr node will yield an
empty Attr of the same name.
NOTE: Clones will always be read/write, even if the node being cloned
is read-only, to permit applications using only the DOM API to obtain
editable copies of locked portions of the tree.
public Node getParentNode()
getParentNode in interface NodegetParentNode in class NodeImplpublic Node getNextSibling()
getNextSibling in interface NodegetNextSibling in class NodeImplpublic Node getPreviousSibling()
getPreviousSibling in interface NodegetPreviousSibling in class NodeImplCopyright © 2023 Gargoyle Software Inc.. All rights reserved.