This is a static archive of the Python wiki, which was retired in February 2026 due to lack of usage and the resources necessary to serve it — predominately to bots, crawlers, and LLM companies.
Pages are preserved as they were at the time of archival. For current information, please visit python.org.
If a change to this archive is absolutely needed, requests can be made via the infrastructure@python.org mailing list.

ElementTree and lxml:

Start here if you want to write new code for XML processing

ElementTree tutorial: http://effbot.org/zone/element.htm

lxml tutorial: http://lxml.de/tutorial.html

Dive into Python 3, chapter on XML processing: https://www.cmi.ac.in/~madhavan/courses/prog2-2012/docs/diveintopython3/xml.html

DOM/SAX:

Start here if you need to maintain existing DOM/SAX code that uses the xml.dom and xml.sax packages, or want to process XML using these packages

Note: some of these also describe the use of PyXML, which is an outdated XML package that is no longer maintained and should not be used in new code.

Python XML Tutorial: https://www.tutorialspoint.com/python/python_xml_processing.htm


2026-02-14 16:14