Package org.cyberneko.html
Class HTMLScanner.SpecialScanner
java.lang.Object
org.cyberneko.html.HTMLScanner.SpecialScanner
- All Implemented Interfaces:
HTMLScanner.Scanner
- Enclosing class:
HTMLScanner
Special scanner used for elements whose content needs to be scanned
as plain text, ignoring markup such as elements and entity references.
For example: <SCRIPT> and <COMMENT>.
- Author:
- Andy Clark
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected String
Name of element whose content needs to be scanned as text.protected boolean
True if <style> element.protected boolean
True if <textarea> element.protected boolean
True if <title> element. -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionboolean
scan
(boolean complete) Scan.protected void
scanCharacters
(org.apache.xerces.util.XMLStringBuffer buffer, int delimiter) Scan characters.setElementName
(String ename) Sets the element name.
-
Field Details
-
fElementName
Name of element whose content needs to be scanned as text. -
fStyle
protected boolean fStyleTrue if <style> element. -
fTextarea
protected boolean fTextareaTrue if <textarea> element. -
fTitle
protected boolean fTitleTrue if <title> element.
-
-
Constructor Details
-
SpecialScanner
public SpecialScanner()
-
-
Method Details
-
setElementName
Sets the element name. -
scan
Scan.- Specified by:
scan
in interfaceHTMLScanner.Scanner
- Parameters:
complete
- True if the scanner should not return until scanning is complete.- Returns:
- True if additional scanning is required.
- Throws:
IOException
- Thrown if I/O error occurs.
-
scanCharacters
protected void scanCharacters(org.apache.xerces.util.XMLStringBuffer buffer, int delimiter) throws IOException Scan characters.- Throws:
IOException
-