Question about XPath with functions in it

前端 未结 6 496
-上瘾入骨i
-上瘾入骨i 2021-01-03 11:37

this is a follow-up question of my previous thread:

Please help me on understanding this XPath

I have an XPath as:



        
6条回答
  •  鱼传尺愫
    2021-01-03 12:08

    preceding-sibling:: is an axis which returns a nodeset. In this case, * tells it all preceding siblings. count() counts the number of nodes in a nodeset. So, this part of the expression gives us the total number of nodes that have the same parent as the current node which appear before it in the document.

提交回复
热议问题