# File lib/nokogiri/xml/node.rb, line 433
      def parse string_or_io, options = ParseOptions::DEFAULT_XML
        if Fixnum === options
          options = Nokogiri::XML::ParseOptions.new(options)
        end
        # Give the options to the user
        yield options if block_given?

        contents = string_or_io.respond_to?(:read) ?
          string_or_io.read :
          string_or_io

        return Nokogiri::XML::NodeSet.new(document) if contents.empty?
        in_context(contents, options.to_i)
      end