Ben Chuanlong Du's Blog

It is never too late to learn.

Parse Xml in Python

xml.etree.ElementTree

from html.parser import HTMLParser

https://www.crummy.com/software/BeautifulSoup/bs4/doc/

https://github.com/lxml/lxml

xml.etree.ElementTree is for parsing strict XML text. Do NOT use xml.etree.ElementTree to parse HTML string.

In [ ]:

Comments