It's an Iterator
on the "current level" of the tree. This level starts at the root node (and therefore obviously contains only one element), and can then be changed to children of the current node using {@link #enterChildren()} or poppedback to the parent level using {@link #leave()}.
The {@link #next()} method will return the next node in the iteration,and set the current node used by many convenience methods giving information about that node.
This class was primarily written for page templates containing {@link Tree}s (see org/apache/cocoon/forms/generation/jx-macros.xml
) but can of course be used in other places as well.
@version $Id: TreeWalker.java 587759 2007-10-24 03:00:37Z vgritsenko $
TreeWalker
objects are used to navigate a document tree or subtree using the view of the document defined by its whatToShow
flags and any filters that are defined for the TreeWalker
. Any function which performs navigation using a TreeWalker
will automatically support any view defined by a TreeWalker
. Omitting nodes from the logical view of a subtree can result in a structure that is substantially different from the same subtree in the complete, unfiltered document. Nodes that are siblings in the TreeWalker view may be children of different, widely separated nodes in the original view. For instance, consider a Filter that skips all nodes except for Text nodes and the root node of a document. In the logical view that results, all text nodes will be siblings and appear as direct children of the root node, no matter how deeply nested the structure of the original document. @since DOM Level 2
|
|
|
|
|
|
|
|
|
|
|
|