org.htmlparser.scanners

Interface Scanner

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
Tagscan(Tag tag, Lexer lexer, NodeList stack)
Scan the tag.

Method Detail

scan

public Tag scan(Tag tag, Lexer lexer, NodeList stack)
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.

HTML Parser is an open source library released under LGPL. SourceForge.net