大数据 爬虫Python AI Sql程序员

《Python爬虫开发与项目实践》读书笔记——XPath

2017-12-14  本文已影响85人  LionelDong

XPath

1.XPath节点

<?xml version="1.0" encoding="ISO-8859-1"?>
<classroom>
    <student>
        <id>1001</id>
        <name lang="en"> marry</name>
        <age>20</age>
        <country>China</country>
    </student>
</classroom>

2. XPath语法


3. XPath轴

//id/parent::*


上一篇 下一篇

猜你喜欢

热点阅读