[jdom-interest] Re: Is reverse XPath possible

bob mcwhirter bob at werken.com
Mon Jul 2 08:01:37 PDT 2001

Currently, no that's not possible.

No certain how it'd be implemented either, since wacky xpaths
can require almost a complete evaluation of it to determine

You can always just eval the xpath, dump the resulitng List into
a HashSet, and then you have nearly constant-time lookup to see
if your desired element is a member.


On Mon, 2 Jul 2001, Markus Bernhardt wrote:

> Hi !
> What I need is a xpath implementation which can do something like:
> Is this object part of the result of this xpath applied to this object ?
> All to me known xpath implementations are of the type:
>     Take a start node and find the result nodes.
> So I get a list of objects and have to scroll through the list, to find
> (perhaps) my object.
> Question:
> Is it possible to extend the werken.xpath package to accomplish this
> task ?
> Is it possible at all to write such a xpath algorithm ?
> - markus

More information about the jdom-interest mailing list