Skip to Main Content

Java EE (Java Enterprise Edition) General Discussion

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

Any existing parser for parsing XPath expression into an data structure?

843834Nov 13 2009 — edited Nov 18 2009
Hello, I have a search query string like below, it can get more complex, it's in xpath like syntax.
I need to parse it into some kind of tree structure with the operands and values, then I can traverse
that tree and pass the operands into another search engine.


Property contains "abc" and param1 is with value 'val1',
(contains(Property[@param1='val1'], 'abc'))


I have just looked at the java5's XPath module, that doesn't seem to address my needs, it does not
have a low level API that I can compile expression into a tree structure, but mainly for processing XML files.

Does anyone know any freeware that we can use? Does the apache xml module provide some
low level APIs for parsing without an XML file.

Thanks,
-Yu
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Dec 16 2009
Added on Nov 13 2009
3 comments
177 views