Top Description Fields Constructors Methods
org.apache.xerces.dom

public abstract Class ChildNode

extends NodeImpl
Class Inheritance
Known Direct Subclasses
org.apache.xerces.dom.ParentNode, org.apache.xerces.dom.CharacterDataImpl
Imports
org.w3c.dom.Node

ChildNode inherits from NodeImpl and adds the capability of being a child by having references to its previous and next siblings.
Version
$Id: ChildNode.java 447266 2006-09-18 05:57:49Z mrglavas $

Field Summary

Modifier and TypeField and Description
protected ChildNode
nextSibling

Next sibling.

protected ChildNode
previousSibling

Previous sibling.

pack-priv static final long
Inherited from org.apache.xerces.dom.NodeImpl:
DOCUMENT_POSITION_CONTAINSDOCUMENT_POSITION_DISCONNECTEDDOCUMENT_POSITION_FOLLOWINGDOCUMENT_POSITION_IMPLEMENTATION_SPECIFICDOCUMENT_POSITION_IS_CONTAINEDDOCUMENT_POSITION_PRECEDINGELEMENT_DEFINITION_NODEFIRSTCHILDflagsHASSTRINGIDIGNORABLEWSNORMALIZEDOWNEDownerNodeREADONLYSPECIFIEDSYNCCHILDRENSYNCDATATREE_POSITION_ANCESTORTREE_POSITION_DESCENDANTTREE_POSITION_DISCONNECTEDTREE_POSITION_EQUIVALENTTREE_POSITION_FOLLOWINGTREE_POSITION_PRECEDINGTREE_POSITION_SAME_NODE

Constructor Summary

AccessConstructor 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

Every Node knows what Document it belongs to.

public
ChildNode()

Constructor for serialization.

Method Summary

Modifier and TypeMethod and Description
public Node
cloneNode(boolean
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).
deep
)

Overrides org.apache.xerces.dom.NodeImpl.cloneNode.

Implements org.w3c.dom.Node.cloneNode.

Returns a duplicate of a given node.
public Node
getNextSibling()

Overrides org.apache.xerces.dom.NodeImpl.getNextSibling.

Implements org.w3c.dom.Node.getNextSibling.

The next child of this node's parent, or null if none
public Node
getParentNode()

Overrides org.apache.xerces.dom.NodeImpl.getParentNode.

Implements org.w3c.dom.Node.getParentNode.

Returns the parent node of this node
public Node
getPreviousSibling()

Overrides org.apache.xerces.dom.NodeImpl.getPreviousSibling.

Implements org.w3c.dom.Node.getPreviousSibling.

The previous child of this node's parent, or null if none
pack-priv final NodeImpl
pack-priv final ChildNode
Inherited from org.apache.xerces.dom.NodeImpl:
addEventListenerappendChildchangedchangescompareDocumentPositioncompareTreePositiondispatchEventgetAttributesgetBaseURIgetChildNodesgetContainergetElementAncestorgetFeaturegetFirstChildgetLastChildgetLengthgetLocalNamegetNamespaceURIgetNodeNamegetNodeNumbergetNodeTypegetNodeValuegetOwnerDocumentgetPrefixgetReadOnlygetTextContentgetTextContentgetUserDatagetUserDatagetUserDataRecordhasAttributeshasChildNodeshasStringValuehasStringValueinsertBeforeinternalIsIgnorableWhitespaceisDefaultNamespaceisEqualNodeisFirstChildisFirstChildisIdAttributeisIdAttributeisIgnorableWhitespaceisNormalizedisNormalizedisOwnedisOwnedisReadOnlyisReadOnlyisSameNodeisSpecifiedisSpecifiedisSupporteditemlookupNamespacePrefixlookupNamespaceURIlookupPrefixneedsSyncChildrenneedsSyncChildrenneedsSyncDataneedsSyncDatanormalizeownerDocumentremoveChildremoveEventListenerreplaceChildsetNodeValuesetOwnerDocumentsetPrefixsetReadOnlysetTextContentsetUserDatasetUserDatasynchronizeDatatoString

Field Detail

nextSiblingback to summary
protected ChildNode nextSibling

Next sibling.

previousSiblingback to summary
protected ChildNode previousSibling

Previous sibling.

serialVersionUIDback to summary
pack-priv static final long serialVersionUID

Hides org.apache.xerces.dom.NodeImpl.serialVersionUID.

Serialization version.

Constructor Detail

ChildNodeback to summary
protected ChildNode(CoreDocumentImpl ownerDocument)

No public constructor; only subclasses of Node should be instantiated, and those normally via a Document's factory methods

Every Node knows what Document it belongs to.

ChildNodeback to summary
public ChildNode()

Constructor for serialization.

Method Detail

cloneNodeback to summary
public Node cloneNode(boolean deep)

Overrides org.apache.xerces.dom.NodeImpl.cloneNode.

Implements org.w3c.dom.Node.cloneNode.

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.

Parameters
deep:boolean

Doc from org.w3c.dom.Node.cloneNode.

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).

Returns:Node

Doc from org.w3c.dom.Node.cloneNode.

The duplicate node.

See Also
<p> Example: Cloning a Text node will copy both the node and the text it contains. <p> 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. <p> 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.
getNextSiblingback to summary
public Node getNextSibling()

Overrides org.apache.xerces.dom.NodeImpl.getNextSibling.

Implements org.w3c.dom.Node.getNextSibling.

The next child of this node's parent, or null if none

getParentNodeback to summary
public Node getParentNode()

Overrides org.apache.xerces.dom.NodeImpl.getParentNode.

Implements org.w3c.dom.Node.getParentNode.

Returns the parent node of this node

getPreviousSiblingback to summary
public Node getPreviousSibling()

Overrides org.apache.xerces.dom.NodeImpl.getPreviousSibling.

Implements org.w3c.dom.Node.getPreviousSibling.

The previous child of this node's parent, or null if none

parentNodeback to summary
pack-priv final NodeImpl parentNode()

Overrides org.apache.xerces.dom.NodeImpl.parentNode.

previousSiblingback to summary
pack-priv final ChildNode previousSibling()

Overrides org.apache.xerces.dom.NodeImpl.previousSibling.