| Features | - ElementTree-compatible API
- XPath and XSLT, with Python extension functions
- validation with DTD, RelaxNG, XML Schema and Schematron
- lxml.html for HTML parsing, links, forms and diffs
- CSS selectors via lxml.cssselect
- incremental and event-based parsing with iterparse
| - XML to nested dicts and back (parse and unparse)
- streaming mode for large documents
- namespace support
- force_list and force_cdata for chosen elements
- entity parsing off by default
| - Screen-scraping library for Python
- Reads HTML, XML and SGML markup
- Installed as beautifulsoup4 from PyPI
- Packaged in Debian as python3-bs4
|