The attribute is being treated as a string for comparison purposes. Therefor, only equal and not equal will work. What is the "tester works but in java it doesn't" ? DOM4J uses the Jaxen under the covers for XPath. I tried your test in XPE (see http://www.purpletech.com/xpe ) which uses Jaxen as well and it looks like it failed on the parseInt operation. You have a number that is larger than an "int". It may be a limitation of Jaxen. Don't know yet. I am looking for the latest version of XPE and Jaxen. I have a version about 6 months old.
Based on XPath 1.0, it will take your XPath expression and try to evaluate the element/attribute to a number if you are comparing with a number. Since the "parse" failes, it can not do a numberic comparison, only a string one.
At least that is my guess for now. It has me curious. I will do a little more checking. It would appear that someone should modify the Jaxen code to use a parse Long instead. That would buy you the size you need.
Hope that sheds some possible light on the issue.
Later, Dave
[EMAIL PROTECTED] wrote:
Dear all,
I'm trying to return a set of values based on date stored in millisecond
format.
e.g.
results/[EMAIL PROTECTED] >1044226800000]
which works ok in the tester but in java it doesn't.
I'm using:
String strXpath = "/results/[EMAIL PROTECTED] > 1046559600000]";
Where a typical line from the DOMdoc = <snapshot Date="2003-03-21 00:00" msDate="1048201200000" TimePd="Total">
I've tried also using the number function but it returns all or nothing but
never the correct value.
Any clues would be gratefully received.
Thanks
Kevin
-------------------------------------------------------------------- mail2web - Check your email from the web at http://mail2web.com/ .
------------------------------------------------------- This SF.net email is sponsored by: The Definitive IT and Networking Event. Be There! NetWorld+Interop Las Vegas 2003 -- Register today! http://ads.sourceforge.net/cgi-bin/redirect.pl?keyn0001en _______________________________________________ dom4j-user mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/dom4j-user
--
+------------------------------------------------------------+ | David Lucas mailto:[EMAIL PROTECTED] | | Lucas Software Engineering, Inc. (740) 964-6248 Voice | | Unix,Java,C++,CORBA,XML,EJB (614) 668-4020 Mobile | | Middleware,Frameworks (888) 866-4728 Fax/Msg | +------------------------------------------------------------+ | GPS Location: 40.0150 deg Lat, -82.6378 deg Long | | IMHC: "Jesus Christ is the way, the truth, and the life." | | IMHC: "I know where I am; I know where I'm going." <>< | +------------------------------------------------------------+
Notes: PGP Key Block=http://www.lse.com/~ddlucas/pgpblock.txt IMHO="in my humble opinion" IMHC="in my humble conviction" All trademarks above are those of their respective owners.
------------------------------------------------------- This SF.net email is sponsored by: The Definitive IT and Networking Event. Be There! NetWorld+Interop Las Vegas 2003 -- Register today! http://ads.sourceforge.net/cgi-bin/redirect.pl?keyn0001en _______________________________________________ dom4j-user mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/dom4j-user