class Nokogiri::HTML::SAX::Parser
def parse_file filename, encoding = 'UTF-8'
##
def parse_file filename, encoding = 'UTF-8' raise ArgumentError unless filename raise Errno::ENOENT unless File.exist?(filename) raise Errno::EISDIR if File.directory?(filename) ctx = ParserContext.file(filename, encoding) yield ctx if block_given? ctx.parse_with self end