Appendix C. Python SAX API

The Simple API for XML (SAX), is essentially a collection of interfaces. Python supports the second version of the SAX specification, often referred to as SAX 2. There are several interfaces defined by the SAX API, and the Python implementation includes convenient base classes that make it simple to define only the methods you are actually interested in providing. Also included in the Python version of the interface are some convenience functions that make working with SAX very easy for most basic applications.

The SAX interface is discussed in Chapter 3; several examples are given in that chapter. The official documentation for the Python version of SAX is part of the Python Library Reference, available online and in downloadable formats from the Python web site at

Get Python & XML now with O’Reilly online learning.

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