You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@jackrabbit.apache.org by "g. raaja" <ra...@gmail.com> on 2011/07/07 14:00:29 UTC

What I have to use instead of Query.XPATH

Hi, 

Its showing Query.XPATH is deprecated and in API its showing 

Deprecated. As of JCR 2.0, this language is deprecated.

my code is: This is for adding spellcheck 

*QueryManager qm = jcrSession.getWorkspace().getQueryManager(); 
Query query =
qm.createQuery("/jcr:root[rep:spellcheck('"+content+"')]/(rep:spellcheck())",
Query.XPATH);*

and in another condition 

*QueryManager qm = jcrSession.getWorkspace().getQueryManager(); 
stmt1 ="//element(*,nt:resource)[jcr:contains(.,'"+content+"')]"; 
Query q = qm.createQuery(stmt1, Query.XPATH); *

I am not getting an idea what I have to use instead of this. 

Please guide me what to use in the place of this Query.XPATH. 

Thanking you. 

--raaja g

--
View this message in context: http://jackrabbit.510166.n4.nabble.com/What-I-have-to-use-instead-of-Query-XPATH-tp3651277p3651277.html
Sent from the Jackrabbit - Users mailing list archive at Nabble.com.