From: "Rob ." Date: 2006-07-14T01:39:48+09:00 Subject: Re: Decent HTML Parser? On 7/11/06, Kevin Weller <"http://www.itcrucible.com/contact"@ruby-lang.org> wrote: > Anybody have experience with a decent HTML parser for > a Ruby application? I've looked around, and so far > everything I've found is > either unfinished, unstable, [relatively] undocumented, > or just plain ugly in terms of API. > > I'd like a parser that can take a partial HTML file and > return an easily-traversable data structure, in the same > order that the elements appear in the file. If you find the Ruby options don't cut it, then I recommend TagSoup which is implemented in Java but "keeps on trucking" to convert HTML found in the wild to well-formed XML files: http://home.ccil.org/~cowan/XML/tagsoup/ I use it when screenscraping, then load the resulting XML files with REXML. Rob