Cody Fendant has asked for the wisdom of the Perl Monks concerning the following question:
Here's a minimal example: say I have two paragraphs:
<p> Paragraph one here. </p> <p> Paragraph <b>two</b> here. </p>
And I use Mojo::DOM to grab their text:
use Mojo::DOM; my $dom = Mojo::DOM->new('<p>Paragraph one here.</p><p>Paragraph <b>two</b> he +re.'); for my $e ( $dom->find('p')->each ) { print $e->text,$/; } ### Output: # Paragraph one here. # Paragraph here. #
How do I access that paragraph's complete text, including the text inside that second level of markup? And is this a bug or a feature?
|
|---|