123456789_123456789_123456789_123456789_123456789_

Module: ActiveSupport::XmlMini_NokogiriSAX

Do not use. This module is for internal use only.
Relationships & Source Files
Namespace Children
Classes:
Defined in: activesupport/lib/active_support/xml_mini/nokogirisax.rb

Instance Attribute Summary

Instance Method Summary

Instance Attribute Details

#document_class (rw)

[ GitHub ]

  
# File 'activesupport/lib/active_support/xml_mini/nokogirisax.rb', line 68

attr_accessor :document_class

Instance Method Details

#parse(data)

[ GitHub ]

  
# File 'activesupport/lib/active_support/xml_mini/nokogirisax.rb', line 71

def parse(data)
  if !data.respond_to?(:read)
    data = StringIO.new(data || "")
  end

  if data.eof?
    {}
  else
    document = document_class.new
    parser = Nokogiri::XML::SAX::Parser.new(document)
    parser.parse(data)
    document.hash
  end
end