标签:sub code xpath parent 参考 asp xpath语法 text 大致
本文大致可以知道/,//,@,[]的用法,还有一些函数的用法
假设有一个根元素school,一个子元素student,一个属性name和一个子元素age,一个子元素class
//@name —— 选取所有name属性
/school/student[age>15]/class —— 满足上一个条件的class元素
node() —— 匹配任何类型的节点
//student[@*] —— 选取所有带有属性的student元素
使用方式轴名::元素或方法
//book[position()<=3] 选择前三个 book 元素
http://www.w3school.com.cn/xpath/index.asp
标签:sub code xpath parent 参考 asp xpath语法 text 大致
原文地址:https://www.cnblogs.com/hf99/p/9742834.html