在当前节点下,选取它所有同时具备 href 和 lmv 属性的后代元素。
使用 and 语法的 XPath 表达式:
./descendant::*[@href and @lmv] 或者 .//*[@href and @lmv]
指定 lmv 属性值为"电视剧"的 XPath 表达式:
./descendant::*[@href and @lmv='电视剧'] 或者 .//*[@href and @lmv='电视剧']
在当前节点下,选取它所有具备href或lmv属性的后代。
使用 "|" 语法的 XPath 表达式:
./descendant::*[@href|@lmv] 或者 .//*[@href|@lmv]
注:以上 lmv 为自定义属性。