Horizontal xml slider w/ various image widths


I’m new here and perhaps am posting a question that has been answered previously, but was unable to find. My apologies if so.

I’m designing a horizontal image slider. I want it to load from an xml and to recognize different widths in the images (all images will have the same height). I find plenty of ways to load from an xml, however the images must always conform to a predetermined set of dimensions. I really need the width to be variable (according to images) with a small gap between each image.

Any help with this?