Although the escape sequence for a single quote (') in Xml is '
, there's a limitation in XPath 1.0
preventing '
from being used directly in a path.
Also, as it stands, your question asks for any element with a text
attribute containing the search string, e.g.
<node text="Please upload this owner's ID:" />
Assuming there are no other text
attributes with strings containing those two phases, a hacky approximation to the search would be:
//*[contains(@text, 'Please upload this owner') and contains(@text, 's ID:')]
If however you meant that the element's text()
content needed to match (i.e. not a text
attribute):
<node>Please upload this owner's ID</node>
Then the same hack would be:
//*[contains(text(), 'Please upload this owner') and contains(text(), 's ID:')]