Yes, you are correct, there is an error in the example.
The string literal written as
Code:
'<&>''"'
is expanded by the XML parser to
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:
Code:
'<&>''"'
or as
Code:
'<&>''"'
if you prefer.