Use xpath and any scripting language? One of the Haskell libraries (haxml?) provides an executable. for ruby I recommend nokogiri other languages use google Marc Weber