struzik-vladislav / xpath-extended
Additional functions for XPath
Installs: 11 583
Dependents: 3
Suggesters: 0
Security: 0
Stars: 0
Watchers: 2
Forks: 0
Open Issues: 0
Requires
- php: >=5.6
This package is auto-updated.
Last update: 2025-02-26 18:02:19 UTC
README
Additional functions for XPath.
Usage
Initialisation
<?php use XPath\DOMXPath; $xpath = new DOMXPath($domdocument);
XPath\quote('string')
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);