FluentDOM\Node\Xpath::evaluate PHP Method

evaluate() public method

Evaluate an xpath expression in the context of this element.
public evaluate ( string $expression, DOMNode $context = NULL ) : mixed
$expression string
$context DOMNode
return mixed
    public function evaluate($expression, \DOMNode $context = NULL)
    {
        /** @var Document $document */
        $document = $this instanceof Document ? $this : $this->ownerDocument;
        return $document->xpath()->evaluate($expression, isset($context) ? $context : $this);
    }