Class SimpleHTMLParserListener

java.lang.Object
org.htmlunit.html.parser.SimpleHTMLParserListener
All Implemented Interfaces:
HTMLParserListener

class SimpleHTMLParserListener extends Object implements HTMLParserListener
Simple implementation of HTMLParserListener 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 Details

    • LOG

      private static final org.apache.commons.logging.Log LOG
  • Constructor Details

    • SimpleHTMLParserListener

      SimpleHTMLParserListener()
  • Method Details

    • error

      public void error(String message, URL url, String html, int line, int column, String key)
      Description copied from interface: HTMLParserListener
      Called when the HTML parser reports an error.
      Specified by:
      error in interface HTMLParserListener
      Parameters:
      message - the description of the problem
      url - the URL of the document in which the problem occurs
      html - the content of the snippet in which the problem occurs
      line - the line of the problem
      column - the column of the problem
      key - the key identifying the "type" of problem
    • warning

      public void warning(String message, URL url, String html, int line, int column, String key)
      Description copied from interface: HTMLParserListener
      Called when the HTML parser reports a warning.
      Specified by:
      warning in interface HTMLParserListener
      Parameters:
      message - the description of the problem
      url - the URL of the document in which the problem occurs
      html - the content of the snippet in which the problem occurs
      line - the line of the problem
      column - the column of the problem
      key - the key identifying the "type" of problem
    • format

      private static String format(String message, URL url, String html, int line, int column)