I relaize that SVGs would probably be a better approach to this problem, but I'm designing maps for the stages in a friend's Xbox360 platformer game. The game requires an XML document for each level describing the locations of the platforms. It's onerous to do this by hand, and I thought it would be nice to write a Photoshop script/plugin that just looks at certain layers and generates the XML file for you.
JS in PSCS5 has native XML support. Reading and writing XML files is trivial.
Here's a post with a script that writes out some basic layer info to an XML file:
There are probably other examples floating around.