Name
Node
Synopsis
The Node
interface is the base interface for every member of
a DOM document tree. It exposes attributes common to every type of
document object and provides simple methods to retrieve
type-specific information without resorting to downcasting. For
instance, the attributes
list
provides access to the Element
object’s attributes, but it would have no meaning for a ProcessingInstruction
node. (Extracting
pseudo-attributes from a processing instruction requires your
application to parse the contents of the processing
instruction.)
This interface also exposes all methods for querying,
inserting, and removing objects from the document hierarchy. The
Node
interface makes it easier
to build general-purpose tree-manipulation routines that are not
dependent on specific document element types.
Attributes
The following attributes provide information about where
the Node
object is located
within the document tree. These attributes are read-only, and
methods are provided for inserting and removing nodes within the
document tree.
Get XML in a Nutshell, 3rd Edition now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.