本文鏈接:https://blog.csdn.net/ZincZhang/article/details/80248297
選擇兄弟節點
選擇前N位的div標簽
preceding-sibling::div[N]
選擇后N位的div標簽
following-sibling::div[N]
選擇上一級
../
結合使用
//td[text()='xxx']/../followingsibling::tr//tbody//td[contains(@class, p15)]/table/tbody
排除一個屬性的節點
//tbody/tr[not(@class)]
//tbody/tr[not(@class or @id)]
選擇一個有某個屬性的元素
//div[@name]