home | O'Reilly's CD bookshelfs | FreeBSD | Linux | Cisco | Cisco Exam  


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.


Previous: Reference: tag Perl in a Nutshell Next: 17.4 The HTML Module
Reference: tag Book Index 17.4 The HTML Module

Library Navigation Links

Copyright © 2001 O'Reilly & Associates. All rights reserved.