I'm beginner in xpath
for java. I want to get all the nodes that contain specific text, so I tried:
keyword = "employee//[contains(text()," + inputText + ")]";
NodeList nodes = (NodeList) xpath.evaluate(keyword, doc, XPathConstants.NODESET);
after that the result is all the employee elements even they do not have the certain text in it!
Please, help me how I can get only the employee elements that have the text?
Thank you,