From: why the lucky stiff Date: 2005-06-29T05:27:47+09:00 Subject: Re: Best way to parse/update HTML file? Bucco wrote: >Sorry for the newbie question. I am trying to find the best metod for >parsing a HTML file and changinf one tag/item. Unfortunately, REXML >chokes on the file because of the incomplete tags. Completing the tag >is not an option either. What is the best way to find a specific tag >in an html file, change it's text and attribute settings? > Hi. I know I'm a bit late to the discussion, so 'sokay if you have an answer already. A really fantastic HTML parser library is HTree by Tanaka Akira. It's completely forgiving of bad HTML and you can import the document into REXML through the HTree parser. require 'htree' HTree.parse( "Bad markup" ).to_rexml The only downside is that you'll need to install the iconv library, which can be a bit of a pain to track down on Windows. Other than that, it's a great package. _why