开发者

parse xhtml in python 2.6

xml.etree.ElementTree.parse is ch开发者_如何学编程oking 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.


Have you tried BeautifulSoup? It handles documents that aren't well formed and I've found it pretty good.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜