How do I return the maximum value for each ecoRule below using and Xpath expression? So for the first nodeset, I would get 10, and the second 9.
I used xpath code like this as a pure guess but it doesnt work - any ideas...(by the way Im programming in C#)
XML......below
I used xpath code like this as a pure guess but it doesnt work - any ideas...(by the way Im programming in C#)
Code:
_doc.SelectNodes("//ecoRule[@name='"+ ecoRuleName +"']/max(scoreRule[@points])");
XML......below
Code:
<ecoRules>
<ecoRule name="Something Else">
<scoreRule type="ADJACENT" points="5" />
<scoreRule type="CONTAINED" points="10" />
</ecoRule>
<ecoRule name="Adjacent">
<scoreRule type="ADJACENT" points="3" />
<scoreRule type="ADJACENT" points="9" />
<scoreRule type="ADJACENT" points="7" />
</ecoRule>
</ecoRules>