and this is what the XPath parser sees. This is not a valid XPath string literal, because of the embedded single apostrophe. To make it into a valid XPath string literal, the apostrophe needs to be doubled. So it can be written as: