Module: ActiveSupport::XmlMini_LibXML

Extended by:
XmlMini_LibXML
Included in:
XmlMini_LibXML
Defined in:
lib/active_support/xml_mini/libxml.rb

Overview

:nodoc:

Instance Method Summary collapse

Instance Method Details

#parse(string) ⇒ Object

Parse an XML Document string into a simple hash using libxml.

string

XML Document string to parse



11
12
13
14
15
16
17
# File 'lib/active_support/xml_mini/libxml.rb', line 11

def parse(string)
  if string.blank?
    {}
  else
    LibXML::XML::Parser.string(string.strip).parse.to_hash
  end
end