Generating Data.xml from EXIF metadata

Dec 28, 2007 at 4:14 PM
I've been looking for a way to automate the creation of web galleries of my photographs for a while now - my ideal scenario is to keep the master version of my galleries on my PC where I manage my photos, with the folder structure representing the structure of the albums I want to create. I'm using PhotoShop Bridge to inject metadata into my digital images so I don't want to repeat this step when I publish to the web, as the title, description etc are all in the file already.

My plan is to create a simple application which can take the master version of my photo galleries as the source, crawl through it and build the data files necessary to drive Slide.Show and extract the EXIF metadata from the JPGs. Ideally this app would also create thumbnails and album pictures (if they didn't exist in the destination folder structure). The resulting web site could then be uploaded to my hosting environment.

Anyone else interested in this approach?

Dec 28, 2007 at 7:53 PM
Edited Dec 28, 2007 at 7:55 PM
Hi Sean,

It certainly sounds interesting to me! :)

From all the discussions we've been having, I've heard from several folks that they would like to provide data to Slide.Show from a folder structure containing sub-folders (albums) and images (slides). I'm just not sure of the best way to go about it yet...

Ideally, I think this would be a new provider (i.e. not the XmlDataProvider) that interacts directly with a folder on the server, although I'm not sure how this could work using JavaScript in Silverlight 1.0. I doubt that script running on the client would have direct access to a folder on the server. It would definitely be possible, however, to call a Web service or a server-side handler (ashx) and get the data, but this adds deployment complexity and may tie Slide.Show to a specific OS (probably Windows). Hopefully, Silverlight 2.0 will make this possible without needing a Web service or handler. Does anyone have any thoughts or suggestions on the best way to achieve this?

The simpler alternative is to re-use the XmlDataProvider (as you've suggested) and create a helper tool that generates Data.xml for you based on a folder structure. This is obviously possible and very straightforward, but doesn't seems quite as elegant. Still, I'd say go for it! Also, here's another idea: Instead of an exe, is it even easier to create the Data.xml file simply by dragging the source folder onto a batch file or a VBScript?

If you do end up creating such a tool, I'm definitely willing to offer help, feedback, etc. in exchange that you contribute your code back to the Slide.Show community. ;)

Please let me know how you plan to proceed... Thanks!
Dec 30, 2007 at 12:18 AM
Hi Billy,

The approach I'm planning to take is a more "off-server" pre-processing approach. I'm trying to solve a problem that I and a couple of my semi-serious photographer friends have with being able to easily publish albums of images to the web in a semi-automated manner.

In this scenario we keep the master versions of the images on our PCs in a folder structure which mirrors the album structure, these images are exported from PhotoShop etc. and have had the relevant metadata (EXIF data) applied during the editing process so all of the information necessary to create the albums exists in the files and the folder structures.

The plan is to have the pre-processor crawl through the master files on the PC and generate the necessary scaled down images, thumbnails and data.xml to upload to a hosting service as a collection of albums (basically the whole web site). This has the added advantage of making it much easier to recreate a web published album collection for recovery purposes.

I definitely plan to contribute the code just as soon as I have a stable working version - I started coding last night ;o)


Jan 5, 2008 at 2:18 AM
I was trying to make a Slide.Show for some photos from a recent trip and created a similar tool in the process that creates the data.xml, resizes the images to create both thumbs and web-sized images. It grabs some metadata from the pics (date-taken and the like) to add to your Slide.Show too. It might help out, if interested, check out:
Jan 5, 2008 at 11:40 AM
The tool which Ben has created is great - it does all the things I was planning to do with my project :o)

Ben's SlideShow Generator can be found at and would make a great companion application to Slide.Show if he is happy to contribute the code.
Jan 6, 2008 at 5:00 AM
10-4 Sean,
Jan 6, 2008 at 7:27 AM
Edited Jan 6, 2008 at 7:38 AM

bhoffman wrote:
10-4 Sean,

Ben, thanks for contributing your Slide.Show data generator! As the project lead for Slide.Show, I wish we had more time to create design-time tools like the one you've built, but yours definitely help fills the void. In fact, I just used SSGenerator tonight to create another sample that I'm considering adding to the source code. I also added it to our Quick Links and related projects list.

I do have a few suggestions for your tool if you're interested. :)

Now if we could only get official contributors to volunteer to help us fix bugs and add more new features to Slide.Show itself... My wish list is getting longer and longer, and I've still got a User Guide to write and other projects to work on. Anyone interested?
Jan 6, 2008 at 3:39 PM
Billy, always interested in feedback, for feature additions, I've started a discussion at
Jan 6, 2008 at 8:52 PM

bhoffman wrote:
Billy, always interested in feedback

Ok, my feedback is added to your discussion thread. Please let me know if you have questions or thoughts. Thanks!