Skip to content

Kirby 5.0.4

$dom->query()

Executes an XPath query in the document

$dom->query(string $query, DOMNode|null $node = null): DOMNodeList|false

Parameters

Name Type Default Description
$queryrequired string no default value
$node DOMNodeornull null Optional context node for relative queries

Return types

DOMNodeListorfalse

This method modifies the existing $dom object it is applied to and returns it again.

Parent class

Kirby\Toolkit\Dom