commons-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Gebhardt, Jörn" <J.Gebha...@verband.creditreform.de>
Subject AW: JXPath - Iterating over all elements that 'lie on the way'
Date Fri, 15 Jul 2005 12:35:22 GMT
>> Is there a way to access all objects that have been visited while 
>> resolving the XPath expression? Or can I write my own extension to the 
>> reference implementation that helps me, collecting all these objects?
>
>
> I think you are after the "ancestor" axis
>
> HTH 

Hi Torsten,

this helps only to some extend...
First of all, I don't know how I can get the AncestorContext of an element and secondly do
I believe that rolling back the ancestors für all results isn't very efficient, as I will
walk through the same root objects for every item in the result collection.
>From what I have seen in the code isn't it very straight forward to "patch" the reference
implementation only at a specific point to protocol all the objects that have been visited.
But I must admit that the code is somewhat complex and not easy to understand by just skimming
over at the source code...

Do you see any easy option to plug in a call back whenever a new object is retrieved that
lies on one of the target paths?

Thanks in advance,
Jörn


---------------------------------------------------------------------
To unsubscribe, e-mail: commons-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: commons-user-help@jakarta.apache.org


Mime
View raw message