
Sept. 25, 2018
8:18 p.m.
adding a namespace and then using in the selector works: from lxml import etree import sys tree = etree.parse(sys.stdin) print tree.xpath('ns:tr', namespaces={"ns": "http://www.w3.org/TR/html4/"}) On 09/25/2018 11:05 PM, Peng Yu wrote:
from lxml import etree import sys tree = etree.parse(sys.stdin) print tree.xpath('tr', namespaces={None:"http://www.w3.org/TR/html4/"})
-- Brad Clements, bkc@murkworks.com (315)268-1000 Jabber/XMPP: bkclements@gmail.com