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 modules from the PyXML library:
The PyExpat parser reads the entire DocBook source file and represents it as a tree using the Document Object Model (DOM).
The xpath module allows you to use XPath expressions to select things from a DOM tree.
import sys
from xml.dom.ext.reader import PyExpat
from xml import xpath
|