I think you'll need to find an implementation which supports Xpath 2.0 queries.
"Any fool can write code that a computer can understand. Good programmers write code that humans can understand." --- Martin Fowler
Please correct my English.
The Saxon library supports XPath 2.0. I wouldn't hold my breath for either Jaxen or Xalan to support it, not for it to become part of the standard class libraries.
>I am trying with Saxon but I do not find any good examples... I can give you a complete working demo with null xml document. It tests xpath 2.0 specific suppoted function. I would expect you say "good". It still takes effort to do test or anything at all for that matter.
[0] Add saxon9j.jar and saxon9.jar and saxon9-xpath.jar. (Or some other version, if applicable.)
[1] Only one specific saxon related import statement you need to add (among other according to need.)
(Not even need if you tolerate writing out the full package.)
[2] This is the method to be called upon in the test program.
Marco Rossi
Ranch Hand
Joined: Jul 01, 2011
Posts: 30
posted
0
I tried to execute an XPath 2.0 Expression and it works.
What I have done is simply (I found this code on another website):
Your way and mine are similar, by the way.
I tried with your implementation and my application works fine too, thanks.