On Sun Feb 10 07:18:51 2008, GRANDPA wrote:
Show quoted text> HTML::TreeBuilder has no trouble parsing HTML fragments, but
> HTML::Element's as_HTML method wraps the fragment in "implicit"
> elements(HTML, HEAD,BODY).
> It would be nice to (probably optionally) suppress generation of the
> implicit elements by as_HTML.
Hi, I'm slowly working my way backward in time :)
HTML::TreeBuilder adds the HTML, HEAD, and BODY tags when you run new,
so these tags are always present when using TreeBuilder, and all the
code is written with that assumption.
It may be possible to hide these tags in the output, but since there are
other implicit tags that people do generally want just ignoring implicit
tags probably isn't good enough.
You can work around this by finding the contents of the body node and
printing it. I'll ahve a think about how to exclude just the implicit
wrapper nodes and whether it should be done in just as_HTML or in all
the as_** functions..
Cheers, Jeff.