New $dom method $dom->each_text: which returns text content of every descendant node in a list.
Tests on $dom->each_text.
Motivation
I'd like to have this feature to be table to perform context sensitive parsing on the text content of a given tag(with all it descendant in the most frequent cases) without interference with contents of other tags(which is something that $dom->all_text does not provide), I'm totally aware of $dom->text but that do require me to walk through the $dom data structure and use css selectors which is quite tedious.
Hello,
Summary
$dom->each_text
: which returns text content of every descendant node in a list.$dom->each_text
.Motivation
I'd like to have this feature to be table to perform context sensitive parsing on the text content of a given tag(with all it descendant in the most frequent cases) without interference with contents of other tags(which is something that
$dom->all_text
does not provide), I'm totally aware of $dom->text but that do require me to walk through the$dom
data structure and use css selectors which is quite tedious.