From: Ned Konz Date: 2002-05-26T04:52:31+09:00 Subject: [ANNOUNCE] ruby-htmltools, a tree-building HTML parser I have written a tree-building HTML parser that is handy for doing analysis, repair, or transformations of HTML text. The RAA entry is http://www.ruby-lang.org/en/raa-list.rhtml?name=ruby-htmltools and you can download it at: http://www.bike-nomad.com/ruby/ruby-htmltools-1.0.tar.gz It requires the html-parser library, available from http://www.jin.gr.jp/~nahi/Ruby/html-parser/html-parser-19990912p2.tar.gz I'd like to hear your feedback. One thing that I'd like to add is some kind of path matching like XPath or CSS selectors. However, right now you can go: parser = HTMLTreeParser.new() parser.parse_file_named('whatever.html') parser.tree.detect { |e| e.tag == 'table' } and so on to get to individual elements. And, of course, you can use each() to traverse the structure. Thanks, -- Ned Konz http://bike-nomad.com GPG key ID: BEEA7EFE