HTML Parser Home Page

Interface Scanner

All Known Implementing Classes:
CompositeTagScanner, JspScanner, ScriptScanner, StyleScanner, TagScanner

public interface Scanner

Generic interface for scanning. Tags needing specialized operations can provide an object that implements this interface via getThisScanner(). By default non-composite tags simply perform the semantic action and return while composite tags will gather their children.

Method Summary
 Tag scan(Tag tag, Lexer lexer, NodeList stack)
          Scan the tag.

Method Detail


Tag scan(Tag tag,
         Lexer lexer,
         NodeList stack)
         throws ParserException
Scan the tag. The Lexer is provided in order to do a lookahead operation.

tag - HTML tag to be scanned for identification.
lexer - Provides html page access.
stack - The parse stack. May contain pending tags that enclose this tag. Nodes on the stack should be considered incomplete.
The resultant tag (may be unchanged).
ParserException - if an unrecoverable problem occurs.

© 2006 Derrick Oswald
Sep 17, 2006

HTML Parser is an open source library released under Common Public License.