Visitor Pattern
The visitor pattern provides a SAX-view to the parser. It allows a SAX-like interface for parsing with the NodeVisitor class.
Among other things, the visitor pattern makes it very simple to customize processing of a web-page, and cleanly seperate such code. Check LinkExtraction for an example.