Summary
SAX, the Simple API for XML, is a Java native, parser-independent, event-based API for processing XML documents, suitable for use with very large documents and streaming data. SAX is organized mostly around interfaces. The implementation classes vary from one parser to the next.
The two key SAX interfaces are XMLReader, which represents the parser; and ContentHandler, through which the parser communicates with the client application. The client application registers its specific instance of the ContentHandler interface with an XMLReader through the setContentHandler() method. Then, as the XMLReader parses documents, it calls back to the methods in the ContentHandler object.
Only in the simplest programs do these callback methods give ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access