main
public static void main(java.lang.String[] args)
throws java.lang.Exception
Demonstration program to read tokens with a DTDScanner, from Doctype
grammars accessed in three different ways. Firstly, creates a
DTDSCanner which opens the DTD file "Catalogue.dtd" directly, to scan
its tokens. Secondly, reads the XML file "Catalogue.xml" into memory
and extracts the Doctype from the root Document node, then creates a
DTDScanner wrapping a StringReader, reading from the internal grammar
subset, which is stored as a String in the Doctype node. Finally,
creates a DTDScanner opening the file named by the PUBLIC or SYSTEM
property of the Doctype node (stored as the value of the systemID).
- Parameters:
args
- are ignored.
- Throws:
java.lang.Exception
- if an error occurs.