aboutsummaryrefslogtreecommitdiff
path: root/src/org/ccil/cowan/tagsoup/Scanner.java
blob: 04c8b976fb5c0416e11b37dba4c8cca0de62f69c (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
// This file is part of TagSoup and is Copyright 2002-2008 by John Cowan.
//
// TagSoup is licensed under the Apache License,
// Version 2.0.  You may obtain a copy of this license at
// http://www.apache.org/licenses/LICENSE-2.0 .  You may also have
// additional legal rights not granted by this license.
//
// TagSoup is distributed in the hope that it will be useful, but
// unless required by applicable law or agreed to in writing, TagSoup
// is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS
// OF ANY KIND, either express or implied; not even the implied warranty
// of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
// 
// 
// Scanner

package org.ccil.cowan.tagsoup;
import java.io.IOException;
import java.io.Reader;
import org.xml.sax.SAXException;

/**
An interface allowing Parser to invoke scanners.
**/

public interface Scanner {

	/**
	Invoke a scanner.
	@param r A source of characters to scan
	@param h A ScanHandler to report events to
	**/

	public void scan(Reader r, ScanHandler h) throws IOException, SAXException;

	/**
	Reset the embedded locator.
	@param publicid The publicid of the source
	@param systemid The systemid of the source
	**/

	public void resetDocumentLocator(String publicid, String systemid);

	/**
	Signal to the scanner to start CDATA content mode.
	**/

	public void startCDATA();

	}