Package org.htmlunit.cyberneko
Class HTMLScanner.ContentScanner
- java.lang.Object
-
- org.htmlunit.cyberneko.HTMLScanner.ContentScanner
-
- All Implemented Interfaces:
HTMLScanner.Scanner
- Enclosing class:
- HTMLScanner
public class HTMLScanner.ContentScanner extends Object implements HTMLScanner.Scanner
The primary HTML document scanner.
-
-
Constructor Summary
Constructors Constructor Description ContentScanner()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description booleanscan(boolean complete)Scan.protected booleanscanAttribute(XMLAttributesImpl attributes, boolean[] empty)Scans a real attribute.protected voidscanAttributeQuotedValue(int currentQuote, org.htmlunit.cyberneko.HTMLScanner.CurrentEntity currentEntity, XMLString attribValue, XMLString plainAttribValue, boolean normalizeAttributes)protected voidscanAttributeUnquotedValue(org.htmlunit.cyberneko.HTMLScanner.CurrentEntity currentEntity, XMLString attribValue, XMLString plainAttribValue)protected voidscanCDATA()protected booleanscanCDataContent(XMLString xmlString)protected voidscanCharacters()protected voidscanComment()protected booleanscanCommentContent(XMLString buffer)protected voidscanEndElement()protected voidscanPI()protected StringscanStartElement(boolean[] empty)Scans a start element.
-
-
-
Method Detail
-
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() throws IOException- Throws:
IOException
-
scanCDATA
protected void scanCDATA() throws IOException- Throws:
IOException
-
scanComment
protected void scanComment() throws IOException- Throws:
IOException
-
scanCommentContent
protected boolean scanCommentContent(XMLString buffer) throws IOException
- Throws:
IOException
-
scanCDataContent
protected boolean scanCDataContent(XMLString xmlString) throws IOException
- Throws:
IOException
-
scanPI
protected void scanPI() throws IOException- Throws:
IOException
-
scanStartElement
protected String scanStartElement(boolean[] empty) throws IOException
Scans a start element.- Parameters:
empty- Is used for a second return value to indicate whether the start element tag is empty (e.g. "/>").- Returns:
- ename
- Throws:
IOException- in case of io problems
-
scanAttribute
protected boolean scanAttribute(XMLAttributesImpl attributes, boolean[] empty) throws IOException
Scans a real attribute.- Parameters:
attributes- The list of attributes.empty- Is used for a second return value to indicate whether the start element tag is empty (e.g. "/>").- Returns:
- success
- Throws:
IOException- in case of io problems
-
scanAttributeUnquotedValue
protected void scanAttributeUnquotedValue(org.htmlunit.cyberneko.HTMLScanner.CurrentEntity currentEntity, XMLString attribValue, XMLString plainAttribValue) throws IOException- Throws:
IOException
-
scanAttributeQuotedValue
protected void scanAttributeQuotedValue(int currentQuote, org.htmlunit.cyberneko.HTMLScanner.CurrentEntity currentEntity, XMLString attribValue, XMLString plainAttribValue, boolean normalizeAttributes) throws IOException- Throws:
IOException
-
scanEndElement
protected void scanEndElement() throws IOException- Throws:
IOException
-
-