XPath find text in any text node
This expression //text() = ‘Alliance Consulting’ evals to a boolean. In case of this test sample: <r> <t>Alliance Consulting</t> <s> <p>Test string <f>Alliance Consulting</f> </p> </s> <z> Alliance Consulting <y> Other string </y> </z> </r> It will return true of course. Expression you need should evaluate to node-set, so use: //text()[. = ‘Alliance Consulting’] E.g. … Read more