org.jsoup.select
Class NodeTraversor
java.lang.Object
org.jsoup.select.NodeTraversor
public class NodeTraversor
- extends Object
Depth-first node traversor. Use to iterate through all nodes under and including the specified root node.
This implementation does not use recursion, so a deep DOM does not risk blowing the stack.
Method Summary |
void |
traverse(Node root)
Start a depth-first traverse of the root and all of its descendants. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
NodeTraversor
public NodeTraversor(NodeVisitor visitor)
- Create a new traversor.
- Parameters:
visitor
- a class implementing the NodeVisitor
interface, to be called when visiting each node.
traverse
public void traverse(Node root)
- Start a depth-first traverse of the root and all of its descendants.
- Parameters:
root
- the root node point to traverse.
Copyright © 2009-2012 Jonathan Hedley. All Rights Reserved.