Find first child element like CSS does not respect order
I'm talking about '>' selector.
You can see from the following code like CSS rules are not respected.
...
$section = $html->find('div.main',0);
$div = $main->find('div')[0];
//then removing something like (just for explain)
//foreach ($div->find('sup') as $sup) { $sup->outertext = ''; }
/* OVER A RESULT LIKE THIS
<div>
<section>
<section>A</section>
</section>
<section>B</section>
</div>
*/
//here the problem
striptags ( $div->find('> section')[0] ) //this gives back A
striptags ( $div->find('> section')[1] ) //this gives back A TOO!!
I love PHP Simple HTML DOM Parser, but this is a big bug.
Please kill the bug 😎🐞🦋🐝🐜 🔫🔫🔫
Sorry, wrong goal. Close this.
The correct answer it's here:
https://sourceforge.net/p/simplehtmldom/support-requests/63/