Could I add a question here regarding this method, which I am trying to utilise for something similar ??
XML structure is as per the following:
<?xml version="1.0" encoding="UTF-8"?>
-<csv>
-<row>
<col name="FileName">Some Filename</col>
<col name="FileSize in KB">12345</col>
</row>
</csv>
Looking to get the number of nodes for the 'FileSize in KB' equal to 0.
For this I am thinking of using the following XPath expression:
count(//col[@name='FileSize in KB'=0])
But it returns total number of nodes @name='FileSize in KB' rather than actually count those which value is 0.
If there is a different way of stating this equation of 'equal 0' - could someone point me in the right direction pls.
Losing patience now
--- EDIT ----
OK, I've got it. ... But .... I do not understand it. Could someone wise explain why in order to get the total number of /col nodes with a @name='FileSize in KB' it requires that node name identifier to be present, but to count those that have 0 value it works with the following:
count(//col[.='0']) and does not require the name of the /col to be present???
I see no logic here