The first query returns the full element node, i.e. 29, while the second query only returns its text node value 29.
第一个查询将返回完整的元素节点,即29,而第二个查询仅返回其文本节点值29。
The fourth predicate $i/*/price = 29 looks for price elements under any root element, not just "book."
第四个谓词 $i/*/price = 29 将查找任何根元素下的 price 元素,而不仅仅是在 “book” 元素下的。
The former identifies the element node "price", the latter points to the text node with the value "29".
前者识别了元素节点“price”,而后者指向值为“29”的文本节点。
应用推荐