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