本文連接: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.net
排除一個屬性的節點
//tbody/tr[not(@class)]
//tbody/tr[not(@class or @id)]blog
選擇一個有某個屬性的元素
//div[@name]table