use strict;
use warnings;
use HTML::TreeBuilder;
use HTML::Element;
my $html_bold = <
Nested once.
Nested twice.
Nested once.
END
my $tree_bold = HTML::TreeBuilder->new_from_content($html_bold);
print "Bold:\n\n";
$tree_bold->dump();
print "\n";
#The last "nested once" is actually not nested at all, as can be seen from the indenting.
#And the nested twice isn't quite right either.
#
# @0 (IMPLICIT)
# @0.0 (IMPLICIT)
# @0.1 (IMPLICIT)
# @0.1.0
# @0.1.0.0
# " Nested once. "
# @0.1.0.0.1
# @0.1.0.1
# "Nested twice."
# " Nested once. "
my $html_font = <
Nested once.
Nested twice.
Nested once.
END
my $tree_font = HTML::TreeBuilder->new_from_content($html_font);
print "Font:\n\n";
$tree_font->dump();
print "\n";
#Everything is nested like in the original.
# @0 (IMPLICIT)
# @0.0 (IMPLICIT)
# @0.1 (IMPLICIT)
# @0.1.0
# @0.1.0.0
# " Nested once. "
# @0.1.0.0.1
# @0.1.0.0.1.0
# @0.1.0.0.1.0.0
# "Nested twice."
# " Nested once. "
# " "