HTML::DOM::Node - A Perl class for representing the nodes of an HTML DOM tree
use HTML::DOM::Node ':all'; # constants use HTML::DOM; $doc = HTML::DOM->new; $doc->isa('HTML::DOM::Node'); # true $doc->nodeType == DOCUMENT_NODE; # true
$doc->firstChild; $doc->childNodes; # etc
This is the base class for all nodes in an HTML::DOM tree. (See CLASSES AND DOM INTERFACES in the HTML::DOM manpage.) It implements the Node interface, and, indirectly, the EventTarget interface (see the HTML::DOM::EventTarget manpage.
The following DOM attributes are supported:
These two are implemented not by HTML::DOM::Node itself, but by its subclasses.
Those last three always return nothing.
There is also a _set_ownerDocument method, which you probably do not
need to know about.
See the DOM spec. for descriptions of most of these. The first four automatically trigger mutation events. (See the HTML::DOM::Event::Mutation manpage.)
This overrides the HTML::DOM::EventTarget manpage's (non-DOM) method of the same name, so that the document's default event handler is called.
These two (non-DOM) methods of the HTML::Element manpage are overridden, so that they work correctly with comment and text nodes.
The following node type constants are exportable: