# File lib/nokogiri/xml/node.rb, line 710 def write_to io, *options options = options.first.is_a?(Hash) ? options.shift : {} encoding = options[:encoding] || options[0] save_options = options[:save_with] || options[1] || SaveOptions::FORMAT indent_text = options[:indent_text] || ' ' indent_times = options[:indent] || 2 config = SaveOptions.new(save_options) yield config if block_given? native_write_to(io, encoding, indent_text * indent_times, config.options) end