Is there a way to use XPATH to search my xml file for TimeStamps in a certain range?

Questions about XML that are not covered by the other forums should go here.
doanphan111
Posts: 1
Joined: Wed Nov 06, 2019 3:55 pm

Is there a way to use XPATH to search my xml file for TimeStamps in a certain range?

Post by doanphan111 »

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?
adrian
Posts: 2855
Joined: Tue May 17, 2005 4:01 pm

Re: Is there a way to use XPATH to search my xml file for TimeStamps in a certain range?

Post by adrian »

Hello,

Are these Unix-like timestamps, like 1573054992, or what format do they use?
For Unix timestamps it's easy:

Code: Select all

*[xs:long(@TimeStamp) > 1573054992 and xs:long(@TimeStamp) < 1573054990]
Regards,
Adrian
Adrian Buza
<oXygen/> XML Editor, Schema Editor and XSLT Editor/Debugger
http://www.oxygenxml.com
Post Reply