xml.etree.ElementTree.parse is choking on my xhtml file. I saw somewhere that lxml can handle html. Can someone tell me the documented way to parse, and then alter, xhtml? I want to add some javascript to xhtml on the fly.
xml.etree.ElementTree.parse is choking on my xhtml file. I saw somewhere that lxml can handle
Share
Have you tried BeautifulSoup? It handles documents that aren’t well formed and I’ve found it pretty good.