Hi, I posted a similar question and I got a very useful reply. Now the question is a little different, so I post it. I specify it is an XPath 1 related question. This is the content of my XML file:
<?xml version="1.0" encoding="ISO-8859-1"?>
<mainNode>
<subNode>
<h hm="08:45">
<store id="1563">Open</store>
</h>
<h hm="13:00">
<store id="1045">Open</store>
<store id="763">Open</store>
<store id="1047">Open</store>
</h>
<h hm="16:30">
<store id="1045">Open</store>
<store id="763">Open</store>
<store id="1047">Open</store>
</h>
<h hm="20:00">
<store id="1045">Open</store>
<store id="1043">Open</store>
<store id="1052">Open</store>
</h>
<h hm="22:00">
<store id="763">Open</store>
<store id="1052">Open</store>
</h>
</subNode>
</mainNode>
My program gets the current time: if I get 12.40, I must retrieve all the stores id of the next h hm (13.00): this issue has been solved.
After retrieving the data, with a second XPath query, I must get until when, during the current day (of which the XML file is a representation), a single store will be open. So, imagine the store is the store identified with the id=1045 and now it's 12.40 in the morning. This store will close at 20.00 because it is found in the h hm=13.00 subnode, in the h hm=16.30 subnode and in the h hm=20.00 subnode. So, I must get that 20.00.
Case 2: it's 12.40 and I must know when 763 will close. It will close at 16.30, no matter it is included in the last node (h hm=22.00). So, I must get that 16.30.
Is this possible?
Thanks in advance.