Skip to content

Commit

Permalink
Use the REXML parser by default. XmlMini.backend = 'LibXML' to use li…
Browse files Browse the repository at this point in the history
…bxml-ruby.
  • Loading branch information
jeremy committed Mar 9, 2009
1 parent 87d82ef commit 4458edc
Showing 1 changed file with 5 additions and 6 deletions.
11 changes: 5 additions & 6 deletions activesupport/lib/active_support/xml_mini.rb
@@ -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
Expand All @@ -10,10 +14,5 @@ def backend=(name)
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

0 comments on commit 4458edc

Please sign in to comment.