All Packages Class Hierarchy This Package Previous Next Index
Class jp.kyasu.sgml.SGMLParser
java.lang.Object
|
+----jp.kyasu.sgml.SGMLParser
- public class SGMLParser
- extends Object
- implements Serializable
A SGMLParser
parses the SGML document according to
the specified DTD
and delivers the sgml events to
the listeners (SGMLParserListener
s).
For example:
Reader reader = new BufferedReader(new InputStreamReader(System.in));
DTD dtd = new DTD();
// Setups the dtd.
SGMLParser parser = new SGMLParser(dtd);
parser.addSGMLParserListener(new SGMLParserListener(){});
try {
parser.parse(reader);
}
catch (IOException e) {}
Refers to
"ISO 8879 -- Standard Generalized Markup Language (SGML)".
- Version:
- 14 Nov 1997
- Author:
- Kazuki YASUMATSU
- See Also:
- DTD, SGMLEvent, SGMLParserListener
-
SGMLParser(DTD)
- Constructs a sgml parser with the specified dtd.
-
addSGMLParserListener(SGMLParserListener)
- Adds the specified sgml parser listener to receive sgml events
from this parser.
-
parse(Reader)
- Parses the sgml document contained in the specified reader.
-
removeSGMLParserListener(SGMLParserListener)
- Removes the specified sgml parser listener so it no longer
receives sgml events from this parser.
SGMLParser
public SGMLParser(DTD dtd)
- Constructs a sgml parser with the specified dtd.
- Parameters:
- dtd - the specified dtd.
addSGMLParserListener
public void addSGMLParserListener(SGMLParserListener l)
- Adds the specified sgml parser listener to receive sgml events
from this parser.
- Parameters:
- l - the sgml parser listener
removeSGMLParserListener
public void removeSGMLParserListener(SGMLParserListener l)
- Removes the specified sgml parser listener so it no longer
receives sgml events from this parser.
- Parameters:
- l - the sgml parser listener
parse
public void parse(Reader reader) throws IOException
- Parses the sgml document contained in the specified reader.
The sgml events are delivered to the listeners of this parser.
- Parameters:
- reader - the reader that contains the sgml document.
- Throws: IOException
- If an I/O error occurs.
All Packages Class Hierarchy This Package Previous Next Index