- ElementTree is part of the standard library.
- Beautiful Soup is a popular 3rd-party library.
- lxml is a fast and feature-rich C-based library.
- twisted includes a DOM library twisted.web.domhelpers
ElementTree example:
from xml.etree import ElementTree
tree = ElementTree.parse('filename.html')
for elem in tree.findall('table'):
print ElementTree.tostring(elem)
Examples welcomed!