Module: DataActive::ClassMethods

Defined in:
lib/data_active.rb

Instance Method Summary collapse

Instance Method Details

#many_from_xml(source_xml, options = []) ⇒ Object



21
22
23
24
# File 'lib/data_active.rb', line 21

def many_from_xml(source_xml, options = [])
  parser = Nokogiri::XML::SAX::Parser.new(DataActive::SaxDocument.new(self.name.underscore, options))
  parser.parse(source_xml)
end

#one_from_xml(source_xml, options = []) ⇒ Object



26
27
28
# File 'lib/data_active.rb', line 26

def one_from_xml(source_xml, options = [])
  many_from_xml(source_xml, options)
end