Head hurts on this one so can someone throw me a line?
XML is like so (not the real stuff but this is an example for clarity):
<root>
<groups name="A">
<entry from="1" to="10" />
</groups>
<groups name="A">
<entry from="11" to="20" />
<entry from="21" to="30" />
</groups>
<groups name="A">
<entry from="31" to="40" />
<entry from="41" to="50" />
<entry from="51" to="60" />
</groups>
</root>
Given a entry number I want to find the entry node that this number falls between. There should only be one node that matches (if any).
Heres the xpath I'm using:
/root/groups/entry[@from >= 45 and @to <= 45]
I've tried wrapping the attributes in number() too but still no luck.
This is not returning what I'd expect, infact it returns nothing and I can't see why! What am I missing?
Edit: Corrected my typo of the opening groups tags...sorry.