Extracted from Pike v7.4 release 35 at 2003-12-09.
pike.ida.liu.se
[Top]
predef::
Parser
Parser.XML
Parser.XML.Tree
Parser.XML.Tree.AbstractNode

Method Parser.XML.Tree.AbstractNode()->walk_preorder_2()


Method walk_preorder_2

int walk_preorder_2(function(AbstractNode:int|void) callback_1, function(AbstractNode:int|void) callback_2, mixed ... args)

Description

Traverse the node subtree in preorder, root node first, then subtrees from left to right. For each node we call callback_1 before iterating through children, and then callback_2 (which always gets called even if the walk is aborted earlier). If the callback function returns STOP_WALK the traverse decend is aborted and STOP_WALK is returned once all waiting callback_2 functions has been called.