XML : Rails csv file to xml format

How to import cvs file to xml format

My code

  require'csv'    file = Rails.root.to_s + '/public/file.csv'  csv = CSV::parse(File.open(file) { |f| f.read })    

..... than some magic

and i need to

     respond_to do |format|        format.html        format.xml{render xml: xml_file}      end    

No comments:

Post a Comment