import codecs from lxml import etree tree=etree.HTML("<tr><td><img src='china.gif'> China</td></tr>") node=tree.xpath("//tr[1]/td[1]") print node[0].tag print node[0].text // 预期获取到China,为什么获取到的的是None