The Perl and Raku Conference 2025: Greenville, South Carolina - June 27-29 Learn more

use strict;
plan tests => 2;
{
my $root = HTML::TreeBuilder::LibXML->new_from_content("<html><body>", "<p>foo</p>", "</body></html>");
is $root->findvalue("//p"), "foo";
}
{
my $root = HTML::TreeBuilder::LibXML->new_from_file("t/test.html");
is $root->findvalue("//p"), "bar";
}