Searches for an node in the DOM tree and returns first element or null.
public first ( string $expression, string $type = Query::TYPE_CSS, boolean $wrapElement = true ) : |
||
$expression | string | XPath expression or a CSS selector |
$type | string | The type of the expression |
$wrapElement | boolean | Returns \DiDom\Element if true, otherwise \DOMElement |
return |