I work with the following (suboptimal) XML:
<a>
<b>
<c>X:1 Y:0</c>
<c>X:1 Y:0</c>
<c>X:2 Y:0</c>
</b>
<b>
<c>X:1 Y:0</c>
<c>X:2 Y:0</c>
</b>
</a>
I am trying to use XPath to count the number of nodes <c>whose contents contain X:1:
count(contains(/a/b/c, 'X:1'))
However, this returns an error, and does not return the expected quantity 3.
What am I doing wrong?
source
share