The Glue of SAX: XMLReader

SAX defines the XMLReader interface to tie together many of the interfaces discussed so far. This interface is typically implemented by XML parsers but can be implemented by anyone who needs to tie together implementations of the various handler interfaces whose stream of method invocations represent an XML document information item. The XMLReader interface has three families of methods: handler methods, configuration methods, and parse methods. The handler methods consist of four get/set method pairs that allow implementations of ContentHandler, DTDHandler, ErrorHandler, and EntityResolver to be tied together to interpret a single document information item.

 package org.xml.sax; public interface XMLReader { void setContentHandler(ContentHandler ...

Get Essential XML: Beyond Markup now with O’Reilly online learning.

O’Reilly members experience live online training, plus books, videos, and digital content from 200+ publishers.