Additional functions for XPath.
<?php
use XPath\DOMXPath;
$xpath = new DOMXPath($domdocument);
Quotes a string for use in a query.
<?php
$needle = 'abd\'efg';
$expr = sprintf('//root:root/root:node[php:functionString("XPath\quote", text()) = \'%s\']', $needle);
$list = $xpath->query($expr);