title: Searching part of a String using XPath query
body: <p>I am using the following XPath query to search the name of the author of a book and return the book name when it matches the author. </p>
  
  <pre><code>String rawXPath = String.format("//book[author= '%s']/bookname/text()", authorBook);  
  
  XPathFactory factory = XPathFactory.newInstance();
  XPath xpath = factory.newXPath();
  XPathExpression expr 
   = xpath.compile(rawXPath);
  
  Object result = expr.evaluate(doc, XPathConstants.NODESET);
  NodeList nodes = (NodeList) result;
  for (int i = 0; i &lt; nodes.getLength(); i++) {
      System.out.println(nodes.item(i).getNodeValue()); 
  }
  </code></pre>
  
  <p>how to modify the search so that I can search in the content ...../content(node name) for a specific word. </p>
  
  <p>Example:  String inside the xml content variable: "This book contains the glory and history of our forefathers. And the impact of it in our daily life is immense." </p>
  
  <p>Now I want to search for the word "daily". If it matches daily it will retun me the book name/author name watever the user wants.</p>
  
  <p>Thanks</p>