Page 1 of 1

XPATH help

Posted: Thu Jul 21, 2005 5:51 pm
by atp2bdb
I have an XML document that contains elements that have an attribute TimeStamp. Is there a way to use XPATH to search my xml file for TimeStamps in a certain range?

Posted: Fri Jul 22, 2005 10:55 am
by Radu

For this XML file:

Code: Select all

<a id="1"/>
<a id="2"/>
<a id="3"/>
The following XPath

Code: Select all

//a[@id < 3 and @id >1]
gives as result the node a with id = 2.

Hope this helps.
Regards, Radu.