#!/usr/bin/ruby require "htmlsplit" obj = HTMLSplit.new(ARGF.read) obj.document.each {|e| print e.to_s }