struzik-vladislav / xpath-extended
Additional functions for XPath
Package info
github.com/struzik-vladislav/xpath-extended
pkg:composer/struzik-vladislav/xpath-extended
v1.0.0
2017-09-15 23:57 UTC
Requires
- php: >=5.6
This package is auto-updated.
Last update: 2026-02-26 20:16:32 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);