Aside from the standard Python sys
module that gives programs access to their standard I/O
streams and command line arguments, the program needs two
items from the Python's SAX library:
The ContentHandler class is
a base class used to write SAX content handlers. See
the documentation for xml.sax.handler.
The make_parser() function
is used to create a parser using our content handler.
See the documentation for xml.sax.
import sys from xml.sax.handler import ContentHandler from xml.sax import make_parser