org.htmlparser.scanners
Class StyleScanner
java.lang.Object
org.htmlparser.scanners.TagScanner
org.htmlparser.scanners.CompositeTagScanner
org.htmlparser.scanners.StyleScanner
- All Implemented Interfaces:
- Scanner, Serializable
- public class StyleScanner
- extends CompositeTagScanner
The StyleScanner handles style elements.
It gathers all interior nodes into one undifferentiated string node.
- See Also:
- Serialized Form
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
StyleScanner
public StyleScanner()
- Create a style scanner.
scan
public Tag scan(Tag tag,
Lexer lexer,
NodeList stack)
throws ParserException
- Scan for style definitions.
Accumulates nodes returned from the lexer, until </STYLE>,
<BODY> or <HTML> is encountered. Replaces the node factory
in the lexer with a new (empty) one to avoid other scanners missing their
end tags and accumulating even the </STYLE> tag.
- Specified by:
scan in interface Scanner- Overrides:
scan in class CompositeTagScanner
- Parameters:
tag - The tag this scanner is responsible for.lexer - The source of subsequent nodes.stack - The parse stack, not used.
- Returns:
- The resultant tag (may be unchanged).
- Throws:
ParserException
HTML Parser is an open source library released under LGPL.