June 2002
Beginner
759 pages
80h 42m
English
traverse
$h->traverse(sub, [ignoretext])
Traverses the current element and all of its
children, invoking the callback routine
sub for each element. The callback
routine is called with a reference to the current element (the
node), a startflag, and the depth as arguments. The start flag
is 1 when entering a node and
0 when leaving (returning to
a parent element). If the ignoretext
parameter is true (the default), then the callback routine will
not be invoked for text content. If the callback routine returns
false, the method will not traverse any child elements of that
node.