How to handle double quotes in string before XPath evaluation?
PHP has Xpath 1.0, if you have a string with double and single quotes, a workaround is using the Xpath concat() function. A helper function can decide when to use what. Example/Usage: xpath_string(‘I lowe “double” quotes.’); // xpath: ‘I lowe “double” quotes.’ xpath_string(‘It\’s my life.’); // xpath: “It’s my life.” xpath_string(‘Say: “Hello\’sen”.’); // xpath: concat(‘Say: … Read more