jackrabbit-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Alexander Klimetschek <aklim...@day.com>
Subject Re: Query for Nodes from a given Path
Date Tue, 07 Jul 2009 10:44:32 GMT
On Tue, Jul 7, 2009 at 12:36 PM, BOWLER
Paul<Paul.Bowler@alcatel-lucent.com> wrote:
> Hi,
>
> I need to query a subtree for specific nodes, but do not know the syntax
> for this.
>
> Currently I have:
>
> def query = qm.createQuery("//pcf:Color", Query.XPATH)
> return query.execute()
>
> This returns ALL pcf:Color nodes in the repository, but I'd like to
> limit the search down a specific path (or from a specific node).
>
> Any ideas how I could do this?

Standard xpath (except for the jcr:root prefix):

/jcr:root/your/search/path//pcf:Color

Regards,
Alex

-- 
Alexander Klimetschek
alexander.klimetschek@day.com

Mime
View raw message