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 ofHTMLParserListener
logging 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.Log
LOG
-
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 void
error(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.String
format(java.lang.String message, java.net.URL url, java.lang.String html, int line, int column)
void
warning(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:HTMLParserListener
Called when the HTML parser reports an error.- Specified by:
error
in 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:HTMLParserListener
Called when the HTML parser reports a warning.- Specified by:
warning
in 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)
-
-