org.htmlparser.scanners
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.
scan
Tag scan(Tag tag,
Lexer lexer,
NodeList stack)
throws ParserException
- Scan the tag.
The Lexer is provided in order to do a lookahead operation.
- Parameters:
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.
- Returns:
- The resultant tag (may be unchanged).
- Throws:
ParserException
- if an unrecoverable problem occurs.