Xpath for HTML processing

Stefan Behnel stefan_ml at behnel.de
Thu Sep 4 13:59:13 EDT 2008


Astley Le Jasper wrote:
> Can anyone suggest something inthat can process an XPath like the
> following:
> 
> "/html/body/table[2]/tbody/tr/td[5]/table/tbody/tr[3]/td/table[3]/
> tbody/tr[5]/td"

[skipping the obvious joke answer to your question]

In case you're asking for a tool that can process HTML using XPath, try lxml.html.

http://codespeak.net/lxml

Stefan



More information about the Python-list mailing list