org.brownell.xml
Class DoParse
java.lang.Object
|
+--org.brownell.xml.DoParse
- public final class DoParse
- extends java.lang.Object
This class provides a driver which may be invoked from the command line
to make a SAX parser use a specified handler to process a document. This
facilitates some common types of command line tools, such as parsing an
XML document in order test it for well formedness or validity.
The following system properties are used to control the parser used,
and the handler it is given:
- org.xml.sax.parser ... the parser
- org.brownell.xml.DoParse.handler ... the handler
The SAX1 handler interfaces (DocumentHandler, DTDHandler, and
ErrorHandler) are given to the parser if implemented by the handler class.
Similarly, the SAX2 handler interfaces (Lexicalhandler, DeclHandler) are
used if the handler class implements these (and the parser is a SAX2
parser which supports such handlers).
- Version:
- 1.0 (23 June 1999)
- Author:
- David Brownell (db@post.harvard.edu)
Method Summary |
static void |
main(java.lang.String[] argv)
Command line invoker for this class; pass a filename or URL
as the single argument. |
Methods inherited from class java.lang.Object |
clone,
equals,
finalize,
getClass,
hashCode,
notify,
notifyAll,
toString,
wait,
wait,
wait |
main
public static void main(java.lang.String[] argv)
throws java.io.IOException
- Command line invoker for this class; pass a filename or URL
as the single argument.