HTMLDocument and Xpath
swilson at acs.on.ca
swilson at acs.on.ca
Tue Feb 7 04:59:17 EST 2006
Got the answer - there's a bug in xpath. I think the HTML parser
converts all the tags (but not the attributes) to uppercase. Xpath
definitely does not like my first string but, these work fine:
test = Evaluate('//TD', doc_node.documentElement)
test = Evaluate('/HTML/BODY/TABLE/TR/TD', doc_node.documentElement)
test = Evaluate('/HTML/BODY/TABLE/TR/TD[1]', doc_node.documentElement)
Shawn
More information about the Python-list
mailing list