aboutsummaryrefslogblamecommitdiffstats
path: root/activesupport/lib/active_support/xml_mini.rb
blob: 8ae8e7cefe4e7f3ccb5891867c8ffa91b39f5a14 (plain) (tree)
1
2
3
4
5
6
7
           


                    
 
                                      
 






                                                   
         
       
 
               
 

     
# = 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