instance method
xml_in_string
Ruby on Rails 2.2.3
Since v2.2.3 Last seen in v2.2.3Signature
xml_in_string(string, options = nil)
Same as xml_in but doesn’t try to smartly shoot itself in the foot.
Parameters
-
stringreq -
optionsopt = nil
Source
# File activesupport/lib/active_support/core_ext/hash/conversions.rb, line 9
def xml_in_string(string, options = nil)
handle_options('in', options)
@doc = parse(string)
result = collapse(@doc.root)
if @options['keeproot']
merge({}, @doc.root.name, result)
else
result
end
end
Defined in activesupport/lib/active_support/core_ext/hash/conversions.rb line 9
· View on GitHub
· Improve this page
· Find usages on GitHub
Defined in XmlSimple