Package org.htmlunit.html.parser
Class SimpleHTMLParserListener
- java.lang.Object
-
- org.htmlunit.html.parser.SimpleHTMLParserListener
-
- All Implemented Interfaces:
HTMLParserListener
class SimpleHTMLParserListener extends java.lang.Object implements HTMLParserListener
Simple implementation ofHTMLParserListenerlogging the received warnings and errors in the "org.htmlunit.html.HTMLParserListener" log.
Errors are logged at the error level and warnings at the warning level.
-
-
Field Summary
Fields Modifier and Type Field Description private static org.apache.commons.logging.LogLOG-
Fields inherited from interface org.htmlunit.html.parser.HTMLParserListener
LOG_REPORTER
-
-
Constructor Summary
Constructors Constructor Description SimpleHTMLParserListener()
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description voiderror(java.lang.String message, java.net.URL url, java.lang.String html, int line, int column, java.lang.String key)Called when the HTML parser reports an error.private static java.lang.Stringformat(java.lang.String message, java.net.URL url, java.lang.String html, int line, int column)voidwarning(java.lang.String message, java.net.URL url, java.lang.String html, int line, int column, java.lang.String key)Called when the HTML parser reports a warning.
-
-
-
Method Detail
-
error
public void error(java.lang.String message, java.net.URL url, java.lang.String html, int line, int column, java.lang.String key)Description copied from interface:HTMLParserListenerCalled when the HTML parser reports an error.- Specified by:
errorin interfaceHTMLParserListener- Parameters:
message- the description of the problemurl- the URL of the document in which the problem occurshtml- the content of the snippet in which the problem occursline- the line of the problemcolumn- the column of the problemkey- the key identifying the "type" of problem
-
warning
public void warning(java.lang.String message, java.net.URL url, java.lang.String html, int line, int column, java.lang.String key)Description copied from interface:HTMLParserListenerCalled when the HTML parser reports a warning.- Specified by:
warningin interfaceHTMLParserListener- Parameters:
message- the description of the problemurl- the URL of the document in which the problem occurshtml- the content of the snippet in which the problem occursline- the line of the problemcolumn- the column of the problemkey- the key identifying the "type" of problem
-
format
private static java.lang.String format(java.lang.String message, java.net.URL url, java.lang.String html, int line, int column)
-
-