    # File lib/nokogiri.rb, line 66
        def parse string, url = nil, encoding = nil, options = nil
          doc =
            if string.respond_to?(:read) ||
              string =~ /^\s*<[^Hh>]*html/i # Probably html
              Nokogiri.HTML(
                string,
                url,
                encoding, options || XML::ParseOptions::DEFAULT_HTML
              )
            else
              Nokogiri.XML(string, url, encoding,
                            options || XML::ParseOptions::DEFAULT_XML)
            end
          yield doc if block_given?
          doc
        end