Package org.htmlunit.html.parser
Interface HTMLParserListener
-
- All Known Implementing Classes:
SimpleHTMLParserListener
public interface HTMLParserListener
Listener for messages from the HTML parser.
The classification of problems as warnings or errors is the one of the HTML parser used by HtmlUnit. The line and column may indicates the position of the problem detected by the parser. This is only an indication and in some cases the position where the problem has to be solved is located lines before. In some cases (when parsing a html snippet), the html content is also available.
-
-
Field Summary
Fields Modifier and Type Field Description static HTMLParserListener
LOG_REPORTER
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.
-
Method Summary
All Methods Instance Methods Abstract 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.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.
-
-
-
Field Detail
-
LOG_REPORTER
static final HTMLParserListener LOG_REPORTER
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.
-
-
Method Detail
-
error
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.- 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
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.- 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
-
-