Free Trial

Safari Books Online is a digital library providing on-demand subscription access to thousands of learning resources.


  • Create BookmarkCreate Bookmark
  • Create Note or TagCreate Note or Tag
  • DownloadDownload
  • PrintPrint
Share this Page URL
Help

Chapter 5. Validating XML > Output of XML Validation

5.2. Output of XML Validation

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).

Example 5.5. SAXParserDemo Output

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".


  

You are currently reading a PREVIEW of this book.

                                                                                        

Get instant access to over
$1 million worth of books and videos.

  

Start a Free Trial