From: Emmanuel Touzery Date: 2004-02-02T21:48:00+09:00 Subject: Re: HTML parsing Gavin Sinclair wrote: >Hi folks, > >I need to parse some HTML. I've dug around the archives and so on and >found the best solution to be Ned Konz's 'ruby-htmltools', which >relies on 'html-parser'. Both of these projects are not really >maintained, so I'm wondering what other people currently use. > > i was using a home-made solution, but i just decided (this WE) to convert it to REXML: I would use HTML tidy (which is already needed for ~60% of the pages i'm parsing now), and ask tidy to spit out XHTML. i think that's the best (with my home made solution, besides the duplication of work of parsing HTML, i needed a list of tags that you don't need to close etc. in XHTML all is done for me.. and then i get the familiar API of REXML [even though i never used REXML yet :O) ]). i think it's the best. emmanuel