Perl Monk, Perl Meditation | |
PerlMonks |
HTML::TreeBuilder dropping end tagsby admiral_grinder (Pilgrim) |
on Jul 13, 2005 at 17:41 UTC ( [id://474632]=perlquestion: print w/replies, xml ) | Need Help?? |
admiral_grinder has asked for the wisdom of the Perl Monks concerning the following question: I'm having a issue with HTML::Treebuilder. After my data hits the XSLT transformer, I have to do some post-processing on the HTML code to finish out some project requirements. In this case I have 2 functions that use HTML::Treebuilder in series (I don't think it would be a good idea yet to combine them). The first TreeBuilder pass works great. The second pass through the Treebuilder causes not all, but some of the ending html tags to loose the ending tags. Notably 'li' and 'p' tags. For the second pass, I did a cut and paste of the tree setup and output/teardown code from the first pass. I have tried using the second pass just to pull in the HTML and then output it right back out without changing it, yet it drops the ending tags anyways. I am wondering if this is a known issue with HTML::TreeBuilder? Any work arounds or other advise? -- Brian*** Edit *** My first pass was messing up the markup by not putting in the ending tags and when the second tree got ahold of it (I gave it options to preserve the data as it gets it since it was a secion of a HTML page). It built a goofy tree whereas the other pass needed a good tree to do a page order tree walk. Thanks for the quick turnaround on this. It would have taken forever on google groups.
Back to
Seekers of Perl Wisdom
|
|