Docjar: A Java Source and Docuemnt Enginecom.*    java.*    javax.*    org.*    all    new    plug-in

Quick Search    Search Deep

Source code: com/meterware/httpunit/parsing/HTMLParserListener.java


1   package com.meterware.httpunit.parsing;
2   /********************************************************************************************************************
3    * $Id: HTMLParserListener.java,v 1.1 2002/12/25 15:23:11 russgold Exp $
4    *
5    * Copyright (c) 2002, Russell Gold
6    *
7    * Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated
8    * documentation files (the "Software"), to deal in the Software without restriction, including without limitation
9    * the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and
10   * to permit persons to whom the Software is furnished to do so, subject to the following conditions:
11   *
12   * The above copyright notice and this permission notice shall be included in all copies or substantial portions
13   * of the Software.
14   *
15   * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO
16   * THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
17   * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF
18   * CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
19   * DEALINGS IN THE SOFTWARE.
20   *
21   *******************************************************************************************************************/
22  import java.net.URL;
23  
24  /**
25   * A listener for messages from the HTMLParser. This provides a mechanism to watch for errors and warnings generated
26   * during parsing.
27   *
28   * @author <a href="mailto:russgold@httpunit.org">Russell Gold</a>
29   * @author <a href="mailto:bx@bigfoot.com">Benoit Xhenseval</a>
30   **/
31  public interface HTMLParserListener {
32  
33      /**
34       * Invoked when the parser wishes to report a warning.
35       * @param url    the location of the document to which the warning applies.
36       * @param msg    the warning message
37       * @param line   the line in the document on which the problematic HTML was found
38       * @param column the column in the document on which the problematic HTML was found
39       */
40      void warning( URL url, String msg, int line, int column );
41  
42  
43      /**
44       * Invoked when the parser wishes to report an error.
45       * @param url    the location of the document to which the error applies.
46       * @param msg    the warning message
47       * @param line   the line in the document on which the problematic HTML was found
48       * @param column the column in the document on which the problematic HTML was found
49       */
50      void error( URL url, String msg, int line, int column );
51  }