1
// This file is part of TagSoup.
3
// This program is free software; you can redistribute it and/or modify
4
// it under the terms of the GNU General Public License as published by
5
// the Free Software Foundation; either version 2 of the License, or
6
// (at your option) any later version. You may also distribute
7
// and/or modify it under version 2.1 of the Academic Free License.
9
// This program is distributed in the hope that it will be useful,
10
// but WITHOUT ANY WARRANTY; without even the implied warranty of
11
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
16
package org.ccil.cowan.tagsoup;
17
import org.xml.sax.SAXException;
20
An interface that Scanners use to report events in the input stream.
23
public interface ScanHandler {
25
Reports an attribute name without a value.
28
public void adup(char[] buff, int offset, int length) throws SAXException;
31
Reports an attribute name; a value will follow.
34
public void aname(char[] buff, int offset, int length) throws SAXException;
37
Reports an attribute value.
40
public void aval(char[] buff, int offset, int length) throws SAXException;
43
* Reports a <!....> declaration - typically a DOCTYPE
45
public void decl(char[] buff, int offset, int length) throws SAXException;
48
Reports an entity reference or character reference.
51
public void entity(char[] buff, int offset, int length) throws SAXException;
57
public void eof(char[] buff, int offset, int length) throws SAXException;
63
public void etag(char[] buff, int offset, int length) throws SAXException;
66
Reports the general identifier (element type name) of a start-tag.
69
public void gi(char[] buff, int offset, int length) throws SAXException;
72
Reports character content.
75
public void pcdata(char[] buff, int offset, int length) throws SAXException;
78
Reports the data part of a processing instruction.
81
public void pi(char[] buff, int offset, int length) throws SAXException;
84
Reports the target part of a processing instruction.
87
public void pitarget(char[] buff, int offset, int length) throws SAXException;
90
Reports the close of a start-tag.
93
public void stagc(char[] buff, int offset, int length) throws SAXException;
96
Reports the close of an empty-tag.
99
public void stage(char[] buff, int offset, int length) throws SAXException;
105
public void cmnt(char[] buff, int offset, int length) throws SAXException;
108
Returns the value of the last entity or character reference reported.
111
public char getEntity();