Home  >  Article  >  Web Front-end  >  Example analysis of xpath

Example analysis of xpath

一个新手
一个新手Original
2017-09-25 09:47:481613browse

.//: Indicates the current page

*: Indicates the selector

[@id=' ']: Selects the id as..

/dlL: The first dl under the superior id

/dd[5]: The fifth dd under the superior dl

/p[1]: The superior The first p

/span[1]: The first span

under the superior level can be added with text() at the end to get the value of the selected tag

The above is the detailed content of Example analysis of xpath. For more information, please follow other related articles on the PHP Chinese website!

Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn