At 01:15 PM 2003-09-15, James.Q.L wrote:
the output in html turn out to be
<tr><td><b>TEST</b></td></tr>

I added a hack just for this king of thing -- I got bored making whole treelets when I just wanted some literal stuff. So:


use HTML::TreeBuilder;
use strict;
my $root = HTML::TreeBuilder->new_from_content("<p>Hi!");
my $p = $root->look_down('_tag' => 'p') || die "No p?!?";
$p->postinsert(
  ['~literal', {'text' => "<hr I like pie>" } ],
   # See HTML::Element and look for "~literal"
);

print "\nAnd now:\n", $root->as_HTML;


-- Sean M. Burke http://search.cpan.org/~sburke/



Reply via email to