5

Python爬虫编程思想(40):XPath基础

 2 years ago
source link: https://blog.csdn.net/nokiaguy/article/details/120621184
Go to the source link to view the article. You can view the picture content, updated content and better typesetting reading experience. If the link is broken, please click the button below to view the snapshot at that time.

目录

         1  XPath概述

2. 使用XPath

       XPath的英文全称是XML Path Language,中文是XML路径语言,它是一种在XML文档中查找信息的语言,最初是用于在XML文档中搜索节点的,但同样可用于HTML文档的搜索,因为XML与HTML是同源的。

1  XPath概述

        XPath的功能非常强大,它提供了非常简单的路径选择表达式。另外,它还提供了超过100个内建函数,用于字符串、数值、时间的匹配以及节点、序列的处理等。几乎所有我们想定位的节点,都可以用XPath来选择。


About Joyk


Aggregate valuable and interesting links.
Joyk means Joy of geeK