Clear questions and runnable code get the best and fastest answer |
|
PerlMonks |
Re: Re: HTML table-of-contents generatorby John M. Dlugosz (Monsignor) |
on Jul 01, 2003 at 18:47 UTC ( [id://270598]=note: print w/replies, xml ) | Need Help?? |
I would need two passes; first to identify any headers and possibly modiy them to add an id, and second to insert the generated TOC in the correct position (removing the old one). HTML::Parser is pretty primitive, but looks like it's enough to spot the header tags easily enough. But what about modifying the HTML? It needs to print out everything it reads, with the same formatting. I also looked at HTML::TreeBuilder, and it can't output the same format that it read but produces its own re-generation of the text.
In Section
Seekers of Perl Wisdom
|
|