What the ContentHandler Doesn't Tell You

The ContentHandler interface is designed to provide everything most applications need to know about an XML instance document. What it leaves out are things you rarely care about, although most of these are available through other callback interfaces discussed in the next chapter. These include

  • Comments, unskipped entities, and CDATA sections, all of which are available through the LexicalHandler interface

  • The names, public IDs, system IDs, and notations for unparsed entities; and the names, public IDs, and system IDs for notations—all of which are available through the DTDHandler interface

  • ELEMENT, ATTLIST, and parsed ENTITY declarations from the DTD, all of which are reported through the DeclHandler interface ...

Get Processing XML with Java™: A Guide to SAX, DOM, JDOM, JAXP, and TrAX now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.