Web::DOM::TreeWalker
The DOM TreeWalker
object
DESCRIPTION
The Web::DOM::TreeWalker
class implements the DOM TreeWalker
interface.
The TreeWalker
object can be created by the create_tree_walker
method of the Web::DOM::Document object.
METHODS
Following methods are available:
$node = $tw->current_node
-
Return the current node of the tree walker. [DOM]
$code = $tw->filter
-
Return the node filter code. [DOM]
$node = $tw->first_child
-
Move to the first child node. [DOM]
$node = $tw->last_child
-
Move to the last child node. [DOM]
$node = $tw->next_node
-
Move to the next node in document order. [DOM]
$node = $tw->next_sibling
-
Move to the next sibling node. [DOM]
$node = $tw->parent_node
-
Move to the parent node. [DOM]
$node = $tw->previous_node
-
Move to the previous node in document order. [DOM]
$node = $tw->previous_sibling
-
Move to the previous sibling node. [DOM]
$node = $tw->root
-
Return the root node of the tree walker. [DOM]
$int = $tw->what_to_show
-
Return the bit vector representing the node type filter. [DOM]
In addition,
it also supports the obsolete expand_entity_references
method [DOM2TRAVERSAL].
SPECIFICATIONS
- DOM
-
DOM Living Standard
<http://dom.spec.whatwg.org/#interface-treewalker>
. - DOM2TRAVERSAL
-
DOM Level2 Traversal
<http://www.w3.org/TR/DOM-Level-2-Traversal-Range/traversal.html>
.
SEE ALSO
AUTHOR
Wakaba <wakaba@suikawiki.org>.
LICENSE
Copyright 2013 Wakaba <wakaba@suikawiki.org>.
This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself.