<div>Hi,</div>
<div>&nbsp;</div>
<div>&nbsp;</div>
<div>In jackrabbit, How to search a keyword in a xml file using jcr:contains() Xpath query without interfering xml node?</div>
<div>&nbsp;</div>
<div>Eg: I have a content property in a blog entry node &#39;book&#39;. content is represented as xml file (&lt;<em>j2ee</em>&gt;Introduction to x design pattern&lt;/<em>j2ee</em>&gt;). If I search a word &#39;j2ee&#39;, its returning the node which is not currect conceptually.</div>

<div>&nbsp;</div>
<div>Please suggest me the possible approch either to use &#39;regular expression&#39; or alternative way to resolve this requirement.</div>
<div>&nbsp;</div>
<div><font color="#3f7f5f" size="2">//Keyword search</font></div>
<div><font size="2">
<p align="left">StringBuffer queryStr = </p></font><b><font color="#7f0055" size="2">new</font></b><font size="2"> StringBuffer();
<p align="left">queryStr.append(</p></font><font color="#2a00ff" size="2">&quot;//book[jcr:contains(@bookContent,&#39;&quot;</font><font size="2">);
<p align="left">queryStr.append(</p></font><font color="#2a00ff" size="2">&quot;j2ee&quot;</font><font size="2">);&nbsp; 
<p align="left">//queryStr.append(<font color="#2a00ff" size="2">&quot;j??e&quot;</font><font size="2">);</font></p></font>
<p align="left">queryStr.append(<font color="#2a00ff" size="2">&quot;&#39;)]&quot;</font><font size="2">);</font></p>
<p align="left">Query query = queryManager.createQuery(queryStr.toString(), Query.<i><font color="#0000c0" size="2">XPATH</font></i><font size="2">);</font></p>
<p align="left"></p>
<p>QueryResult queryResult = query.execute();</p>
<p>&nbsp;</p>
<p>Regards, Riyaz</p></div>