Re: HTML Table-of-Content Extraction Script



robert wrote:

I'm looking for a function which extracts a table of contents
> of HTML file(s) from <Hx....><a name=...></a>...</Hx>
> and possibly auto-creates the ancors.
Maybe something already exists?

that's the kind of stuff you'll write in approximately two minutes using BeautifulSoup (or if you prefer the ElementTree API, ElementSoup).

start here:

http://www.crummy.com/software/BeautifulSoup/

</F>

.



Relevant Pages

  • Re: HTML Parsing
    ... documentation of BeautifulSoup. ... from BeautifulSoup import BeautifulSoup ... One can even use ElementTree, ... sticking with Beautiful Soup :-) ...
    (comp.lang.python)
  • Re: HTML Table-of-Content Extraction Script
    ... > and possibly auto-creates the ancors. ... BeautifulSoup (or if you prefer the ElementTree API, ...
    (comp.lang.python)