My experiments with Ruby's DL module have led me to create
a Ruby wrapper/interface for HTML Tidy (http://tidy.sf.net).
I'm hoping to get some feedback on it since I'm new to Ruby/DL
and am not able to test on *nix systems at the moment.

Usage:

  require 'tidy'
  html = '<html><title>title</title>Body</html>'
  xml = Tidy.open(:show_warnings=>true) do |tidy|
    tidy.options.output_xml = true
    puts tidy.options.show_warnings
    xml = tidy.clean(html)
    puts tidy.errors
    puts tidy.diagnostics
    xml
  end
  puts xml

Package:

  http://www.newclear.ca/ruby/tidy/
  http://www.newclear.ca/ruby/tidy/apidoc/

Requires a compiled tidy library named "tidylib.so" in your require path.
Libraries can be found on http://tidy.sf.net
Tests done using tidy-dll-fast (http://dev.int64.org/tidy.html) on Win2kPro