开发者社区 问答 正文

python中etree,Element和Tree类型的对象,都支持xpath的方法是什么?

python中etree,Element和Tree类型的对象,都支持xpath的方法是什么?

展开
收起
真的很搞笑 2021-12-03 21:58:13 434 分享 版权
1 条回答
写回答
取消 提交回答
  • etree,Element和Tree类型的对象,都支持xpath的方法:

      foo.xpath('//root')[0].tag

    2021-12-03 21:58:25
    赞同 展开评论