jackrabbit-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Ashok <ashok...@gmail.com>
Subject Need help regarding Xpath query!
Date Thu, 26 May 2011 10:12:37 GMT
Hi,

I am using Jackrabbit 2.0

I am trying the following Xpath query to fetch the attribute information
from my repository:
==============
.
.
.
 QueryManager queryManager = session.getWorkspace().getQueryManager();
 Query q = queryManager.createQuery(
  "/jcr:root/configRoot/" + deviceId + "//element(" + nodeName + ")",
  Query.XPATH);
 QueryResult result = q.execute();
 NodeIterator nr = result.getNodes();
 .
 .
 .
===============

Everything works fine here. Note that in the above query "deviceId" and
"nodeName" are input parameters for this method.

I want to know how we can specify multiple "deviceId" and multiple
"nodeName" in the above query. Usually "deviceId" and "nodeName" will be a
ArrayList. I definitely do not want to do a "*" of "deviceId" and "nodeName"
since it select all the repository results.

Any suggestions?

-- 
Cheers,
Ashok
+91-9600117508

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