The only way I know in PHP to execute an XPath query in a DOM, DOMXPath , works only with DOMDocument :
public __construct ( DOMDocument $doc )
Is there a similar search mechanism for DOMElement ?
The problem is that I need to look for abritrary XPath (which I do not control) regarding DOMElement .
I've tried:
$domElement->getNodePath() . '/' . $xPath;
But if XPath contains | (or symbol), this approach does not work.
dom php xpath
Benjamin
source share