Package org.htmlunit.cyberneko
Class HTMLScanner.SpecialScanner
- java.lang.Object
-
- org.htmlunit.cyberneko.HTMLScanner.SpecialScanner
-
- All Implemented Interfaces:
HTMLScanner.Scanner
- Enclosing class:
- HTMLScanner
public class HTMLScanner.SpecialScanner extends Object implements HTMLScanner.Scanner
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>.
-
-
Field Summary
Fields Modifier and Type Field Description protected StringfElementNameName of element whose content needs to be scanned as text.protected booleanfStyleTrue if <style> element.protected booleanfTextareaTrue if <textarea> element.protected booleanfTitleTrue if <title> element.
-
Constructor Summary
Constructors Constructor Description SpecialScanner()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description booleanscan(boolean complete)Scan.protected voidscanCharacters(XMLString buffer)HTMLScanner.ScannersetElementName(String ename)
-
-
-
Field Detail
-
fElementName
protected String fElementName
Name of element whose content needs to be scanned as text.
-
fStyle
protected boolean fStyle
True if <style> element.
-
fTextarea
protected boolean fTextarea
True if <textarea> element.
-
fTitle
protected boolean fTitle
True if <title> element.
-
-
Method Detail
-
setElementName
public HTMLScanner.Scanner setElementName(String ename)
-
scan
public boolean scan(boolean complete) throws IOExceptionScan.- Specified by:
scanin 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(XMLString buffer) throws IOException
- Throws:
IOException
-
-