Methods

Class/Module Index [+]

Quicksearch

ActiveSupport::XmlMini_LibXMLSAX

Attributes

document_class[RW]

Public Instance Methods

parse(string) click to toggle source
# File 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

[Validate]

Generated with the Darkfish Rdoc Generator 2.