给出以下XML结构
<html>
<body>
<div>
<span>Test: Text2</span>
</div>
<div>
<span>Test: Text3</span>
</div>
<div>
<span>Test: Text5</span>
</div>
</body>
</html>
Run Code Online (Sandbox Code Playgroud)
什么是最好的XPath查询来查找任何span以Test?开头的文本?
A. *_*Rex 23
//span[starts-with(.,'Test')]
Run Code Online (Sandbox Code Playgroud)
参考文献:
http://www.w3.org/TR/xpath/#function-starts-with
https://developer.mozilla.org/en-US/docs/Web/XPath/Functions/starts-with
| 归档时间: |
|
| 查看次数: |
10584 次 |
| 最近记录: |