instance method parse

Ruby on Rails 2.3.18

Since v2.3.18 Last seen in v3.2.22.5

Available in: v2.3.18 v3.0.20 v3.1.12 v3.2.22.5

Signature

parse(string)

No documentation comment.

Parameters

string req
Source
# File activesupport/lib/active_support/xml_mini/libxmlsax.rb, line 63
    def parse(string)
      return {} if string.blank?
      LibXML::XML::Error.set_handler(&LibXML::XML::Error::QUIET_HANDLER)
      parser = LibXML::XML::SaxParser.string(string)
      document = self.document_class.new

      parser.callbacks = document
      parser.parse
      document.hash
    end

Defined in activesupport/lib/active_support/xml_mini/libxmlsax.rb line 63 · View on GitHub · Improve this page · Find usages on GitHub

Defined in ActiveSupport::XmlMini_LibXMLSAX

Type at least 2 characters to search.

↑↓ navigate · open · esc close