- 123 -
Description
: This property represents a node that has a common parent and is the child
of this parent that follows the current node. If this child does not exist, then this property
is set to null.
ownerDocument
Type
: Document node
Description
: This property represents the Document node of the DOM tree in which the
current node resides.
Comments
: The Document node is the highest level parent for any node, and it always
exists. The ownerDocument property is useful because it is a shortcut to the node that
has special capabilities to create other nodes. A detailed description of the Document
node is included in this chapter.
Node Methods
Most of the methods described in this section are used to manage and manipulate
children of nodes. Not all nodes—for example, text nodes—are allowed to have child
nodes. Since all the different node types are nodes, they inherit the following methods,
even if the use of those methods doesn’t make sense. Using a method that would affect
the children of a node that can’t have children results in an error. Please consult Figures
4.13 through 4.19 for details concerning which nodes can have children and what kind of
children are allowable.