Class XmlTraversor

java.lang.Object
org.htmlcleaner.XmlTraversor

public class XmlTraversor 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.

  • Field Details

  • Constructor Details

    • XmlTraversor

      public XmlTraversor()
  • Method Details

    • traverse

      public static void traverse(XmlVisitor visitor, HtmlNode root)
      Start a depth-first traverse of the root and all of its descendants.
      Parameters:
      visitor - Node visitor.
      root - the root node point to traverse.