1 |
/* Parser.java -- HTML parser. |
/* Parser.java -- HTML parser |
2 |
Copyright (C) 2005 Free Software Foundation, Inc. |
Copyright (C) 2005 Free Software Foundation, Inc. |
3 |
|
|
4 |
This file is part of GNU Classpath. |
This file is part of GNU Classpath. |
34 |
this exception to your version of the library, but you are not |
this exception to your version of the library, but you are not |
35 |
obligated to do so. If you do not wish to do so, delete this |
obligated to do so. If you do not wish to do so, delete this |
36 |
exception statement from your version. */ |
exception statement from your version. */ |
37 |
|
|
|
/* |
|
|
* FOR DEVELOPERS: To avoid regression, please run the package test |
|
|
* textsuite/javax.swing.text.html.parser/AllParserTests after your |
|
|
* modifications. |
|
|
*/ |
|
38 |
|
|
39 |
package javax.swing.text.html.parser; |
package javax.swing.text.html.parser; |
40 |
|
|
44 |
import javax.swing.text.ChangedCharSetException; |
import javax.swing.text.ChangedCharSetException; |
45 |
import javax.swing.text.SimpleAttributeSet; |
import javax.swing.text.SimpleAttributeSet; |
46 |
|
|
47 |
|
/* |
48 |
|
* FOR DEVELOPERS: To avoid regression, please run the package test |
49 |
|
* textsuite/javax.swing.text.html.parser/AllParserTests after your |
50 |
|
* modifications. |
51 |
|
*/ |
52 |
|
|
53 |
/** |
/** |
54 |
* <p>A simple error-tolerant HTML parser that uses a DTD document |
* <p>A simple error-tolerant HTML parser that uses a DTD document |
55 |
* to access data on the possible tokens, arguments and syntax.</p> |
* to access data on the possible tokens, arguments and syntax.</p> |
160 |
} |
} |
161 |
|
|
162 |
protected final void startTag(TagElement tag) |
protected final void startTag(TagElement tag) |
163 |
throws ChangedCharSetException |
throws ChangedCharSetException |
164 |
{ |
{ |
165 |
j.startTag(tag); |
j.startTag(tag); |
166 |
} |
} |
189 |
* @throws IOException If the reader throws one. |
* @throws IOException If the reader throws one. |
190 |
*/ |
*/ |
191 |
public synchronized void parse(Reader reader) |
public synchronized void parse(Reader reader) |
192 |
throws IOException |
throws IOException |
193 |
{ |
{ |
194 |
gnu.parse(reader); |
gnu.parse(reader); |
195 |
} |
} |
200 |
* @throws java.io.IOException |
* @throws java.io.IOException |
201 |
*/ |
*/ |
202 |
public String parseDTDMarkup() |
public String parseDTDMarkup() |
203 |
throws IOException |
throws IOException |
204 |
{ |
{ |
205 |
return gnu.parseDTDMarkup(); |
return gnu.parseDTDMarkup(); |
206 |
} |
} |
212 |
* @return true if this is a valid DTD markup declaration. |
* @return true if this is a valid DTD markup declaration. |
213 |
* @throws IOException |
* @throws IOException |
214 |
*/ |
*/ |
215 |
public boolean parseMarkupDeclarations(StringBuffer strBuff) |
protected boolean parseMarkupDeclarations(StringBuffer strBuff) |
216 |
throws IOException |
throws IOException |
217 |
{ |
{ |
218 |
return gnu.parseMarkupDeclarations(strBuff); |
return gnu.parseMarkupDeclarations(strBuff); |
219 |
} |
} |
331 |
* @throws javax.swing.text.ChangedCharSetException |
* @throws javax.swing.text.ChangedCharSetException |
332 |
*/ |
*/ |
333 |
protected void handleEmptyTag(TagElement tag) |
protected void handleEmptyTag(TagElement tag) |
334 |
throws javax.swing.text.ChangedCharSetException |
throws ChangedCharSetException |
335 |
{ |
{ |
336 |
} |
} |
337 |
|
|
430 |
* @param The tag |
* @param The tag |
431 |
*/ |
*/ |
432 |
protected void startTag(TagElement tag) |
protected void startTag(TagElement tag) |
433 |
throws ChangedCharSetException |
throws ChangedCharSetException |
434 |
{ |
{ |
435 |
} |
} |
436 |
} |
} |