Python and XML

xml.dom.minidom is a minimal implementation of the Document Object Model interface, with an API similar to that in other languages. It is intended to be simpler than the full DOM and also significantly smaller. Users who are not already proficient with the DOM should consider using the xml.etree.ElementTree module for their XML processing instead.


The xml.sax package provides a number of modules which implement the Simple API for XML (SAX) interface for Python. The package itself provides the SAX exceptions and the convenience functions which will be most used by users of the SAX API.


cannot process information as fast as DOM can when working with large files.
exclusively can really kill your resources, especially if used on a lot of small files.
is read-only.
DOM allows changes to the XML file.
Since these two different APIs literally complement each other, you can use them both for large projects.