遍歷所有後代
descendant 和 descendant-or-self 軸可用於查詢任何深度的節點的所有後代元素。相比之下,child 軸只穿過直接的孩子。
/child::html/descendant::span
/child::html/descendant-or-self::*
雙斜線//是/descendant-or-self::node()/的捷徑。所以以下表示式是等價的:
table//td
child::table/descendant-or-self::node()/child::td
child::table/descendant::td
table/descendant::td