PHP code example of struzik-vladislav / xpath-extended
1. Go to this page and download the library: Download struzik-vladislav/xpath-extended library. Choose the download type require. 2. Extract the ZIP file and open the index.php. 3. Add this code to the index.php.
<?php
require_once('vendor/autoload.php');
/* Start to develop here. Best regards https://php-download.com/ */
struzik-vladislav / xpath-extended example snippets
use XPath\DOMXPath;
$xpath = new DOMXPath($domdocument);
$needle = 'abd\'efg';
$expr = sprintf('//root:root/root:node[php:functionString("XPath\quote", text()) = \'%s\']', $needle);
$list = $xpath->query($expr);