Show images via XML keys

I'm building a very simple rails application, where the main functionality should be showing the images hosted on a particular AWS S3 bucket.

The bucket has an XML file that I'm attempting to parse to extract the key, and with the key generate the correct URL to display all the images.

* Any XML parsing gems you recommend? I'm having immense trouble with Nokogiri.
* How can I render x amount of images where x is dependent on the number of keys (images) in the XML?

e.g. [In the XML]( you can see each image's filename is in the of the XML. If I append a filename to the site of the host, the image will appear. How can I do that many times over?

1 thought on “Show images via XML keys”

  1. I’m pretty sure that you can keep the info in the xml, put the file into Redis, and then do a .each loop to display the images.

    Personally, I would set up the app to accept xml and store the info in the database and then call the info from the controller using activeRecord. Rails supports xml, so you would just add a responds to xml clause in the create function in the controller and white list the parameters. You can parse in the file by parsing the file by looping through each line.


Leave a Comment