# File lib/nokogiri/xml/sax/parser_context.rb, line 9
        def self.new thing, encoding = 'UTF-8'
          [:read, :close].all? { |x| thing.respond_to?(x) } ?
            io(thing, Parser::ENCODINGS[encoding]) : memory(thing)
        end