xpath获取标签内的text、href xpath获取标签内的text、href/li/a/@herf 这样取的应该是href的内容 /li/a/text() 这样取得是text内容 或者 (‘/li’).a[‘href] (‘/li’).a.text