How do you identify duplicate values in a numerical sequence using XPath 2.0?

前端 未结 4 904
北海茫月
北海茫月 2020-11-30 11:30

I have an XPath expression which provides me a sequence of values like the one below:

1 2 2 3 4 5 5 6 7

It is easy to convert this to a set of u

4条回答
  •  攒了一身酷
    2020-11-30 12:03

    Calculate the difference between your original set and the set of distinct values. This is the set of numbers that occur more than once. Note that numbers in this result set are not necessarily distinct if they occur more than twice in the original sequence so convert again to a set of distinct values if this is required.

提交回复
热议问题