jackrabbit-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Brian Thompson" <elephant...@gmail.com>
Subject Re: neighboring node
Date Thu, 26 Jul 2007 14:18:30 GMT
Iterating over siblings is how I did it in my application.

Alternatively, you could write some code to store an index (or references to
the next/previous siblings) when you save nodes - that would speed lookup
time, but it would make re-ordering the nodes rather expensive.

-Brian



On 7/26/07, maka@onlaw.at <maka@onlaw.at> wrote:
>
> Hello List,
>
>
>
> what do you think is the best way to get the neighbor (=next/previous
> sibling) of a Node?
>
>
>
> The XPath "preceding-sibling" axis does not seem to work, and I couldn't
> find a way to do it without iterating over all child nodes of the
> parent.
>
>
>
> Any hints, ideas and links are very welcome.
>
>
>
> Regards,
>
> Marcus.
>
>

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message