jackrabbit-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Frédéric Esnault <f...@legisway.com>
Subject RE: getNode without the name
Date Tue, 26 Jun 2007 13:45:00 GMT
Hi Bertrand,

Thanks for your answer. In fact this is not what I need. I know about the getNodes() method,
but I was thinking to get a node with a path, not by making a "hack" with java code. Something
like /foo/bar/jcr:child(5) for example, if jcr:chile(x) was a path util retrieving the xth
child of the parent node (here the bar node).

Frédéric Esnault

-----Message d'origine-----
De : bdelacretaz@gmail.com [mailto:bdelacretaz@gmail.com] De la part de Bertrand Delacretaz
Envoyé : mardi 26 juin 2007 11:18
À : users@jackrabbit.apache.org
Objet : Re: getNode without the name

On 6/26/07, Frédéric Esnault <fesn@legisway.com> wrote:

> ...For example, under the lgw:contracts node, I have plenty of nodes named with their
> uuid. I want, from the lgw:contracts node, to get the node with index 5.

Not sure what you mean by index, but Node.getNodes() returns a
NodeIterator, and with NodeIterator.skip(int n) you can move to a
specific child. Isn't that what you need?


View raw message