1
0
Fork 0
mirror of https://github.com/rails/rails.git synced 2022-11-09 12:12:34 -05:00

Use the REXML parser by default. XmlMini.backend = 'LibXML' to use libxml-ruby.

This commit is contained in:
Jeremy Kemper 2009-03-09 13:42:42 -07:00
parent 87d82ef76e
commit 4458edc882

View file

@ -1,5 +1,9 @@
module ActiveSupport
# = XmlMini
#
# To use the much faster libxml parser:
# gem 'libxml-ruby', '=0.9.7'
# XmlMini.backend = 'LibXML'
module XmlMini
extend self
delegate :parse, :to => :@backend
@ -10,10 +14,5 @@ module ActiveSupport
end
end
begin
gem 'libxml-ruby', '=0.9.4', '=0.9.7'
XmlMini.backend = 'LibXML'
rescue Gem::LoadError
XmlMini.backend = 'REXML'
end
XmlMini.backend = 'REXML'
end