1
0
Fork 0
mirror of https://github.com/rails/rails.git synced 2022-11-09 12:12:34 -05:00
rails--rails/activesupport/lib/active_support/xml_mini.rb
Bart ten Brinke 822c41d69d XmlMini supports different backend parsers, starting with libxml
[#2084 state:committed]

Signed-off-by: Jeremy Kemper <jeremy@bitsweat.net>
2009-03-08 13:41:25 -07:00

21 lines
No EOL
418 B
Ruby

# = XmlMini
module ActiveSupport
module XmlMini
extend self
CONTENT_KEY = '__content__'.freeze
# Hook the correct parser into XmlMini
def hook_parser
begin
require 'xml/libxml' unless defined? LibXML
require "active_support/xml_mini/libxml.rb"
rescue MissingSourceFile => e
require "active_support/xml_mini/rexml.rb"
end
end
hook_parser
end
end