Want to export multiple actions for one armature

Hello,

I’m currently trying to write an export script for armatures and action IPOs to be exported into an XML format.
I want to use this data as animations for a character in a game.

In blender I have created a armature with some bones, created muliple actions and animated these actions, one action for running, one for walking, and so on.
Now I want to export these actions.

But I couldn’t find a way in the blender python API to find a link between the Armature or the Armature Object and the multiple actions. I only found the link to the active action.
As I have only actions for the one armature I just got me all actions of the scene.

But then came the next problem. I couldn’t determine a connection between the IPOs in the action and the bones they are animating, as the IPO name doesn’t contain the bone name anymore.

Could somebody please give me a glue how I could get the connection between the IPO and the bone?

(I’m using Blender 2.41, but have only found the python API for 2.37 http://www.blender.org/modules/documentation/)

(Here is the current version of the script, a test file and the generated output www.smash-interactive.com/animtest.zip )

(If the script is ready it surely will be free/available to be used by anybody (Blender Artistic Licence).)