Hello, I have a search query string like below, in xpath like syntax that I need to parse 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 needs-action
(contains(Property[@param1='val1'], 'abc'))


I have just looked at the java5's XPath module, that doesn't seem to address our 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