instance method xml_in_string

Ruby on Rails 2.2.3

Last seen in v2.2.3

Signature

xml_in_string(string, options = nil)

Same as xml_in but doesn’t try to smartly shoot itself in the foot.

Parameters

string req
options opt = 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

Type at least 2 characters to search.

Use the arrow keys to navigate results, Enter to open one, Escape to close.

Keyboard shortcuts

/
Focus search
⌘K / Ctrl-K
Command palette
?
This help
Esc
Close