Safari Books Online is a digital library providing on-demand subscription access to thousands of learning resources.
Make sure your XML document, DTD, copyright file (if you created one), and compiled classes are assembled. You may then run the example program, and you might be surprised at the output (shown in Example 5.5).
D:\prod\JavaXML> java SAXParserDemo D:\prod\JavaXML\contents\contents.xml
Parsing XML File: D:\prod\JavaXML\contents\contents.xml
* setDocumentLocator( ) called
Parsing begins...
**Parsing Error**
Line: 13
URI: file:/D:/prod/JavaXML/contents/contents.xml
Message: Document root element "JavaXML:Book", must match DOCTYPE root
"JavaXML:Book". |