ivopetkov / html5-dom-document-php

A better HTML5 parser for PHP.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

InvalidArgumentException: Unsupported selector (body>strong i)

yangfancn opened this issue · comments

$html = '<body><strong><i>123</i></strong></body>';
$dom = new HTML5DOMDocument();
$dom->loadHTML($html);
print_r($dom->querySelector('body>strong i'));

Throw InvalidArgumentException:
Unsupported selector (body>strong i)
at vendor/ivopetkov/html5-dom-document-php/src/HTML5DOMDocument/Internal/QuerySelectors.php:512

it's always happend on:
selectorA>selectorB selectorC

Child selectors are just plain unsupported?