Here is a very basic example of what you're trying to achieve:
A control file holds some data in the format
Frame-no obj_name,value of 'Key 1'
I have only created 2 shape keys (basic and 'Key 1') to test the script.
1 Finger1,1
1 Finger2,1
1 Finger3,1
1 Finger4,1
10 Finger1,.5
20 Finger2,.5
30 Finger3,.5
40 Finger4,.5
50 Finger1,1
The python script reads the control file and adds keyframes for each line
import bpy
filename='C:\\dev\\finger_shape.txt'
for line in open(filename):
line=line.rstrip("\n")
# Only append lines that have space in them.
if line.find(" ") != -1 and line.find("#") == -1:
# Split non comment lines of the format: Frame-no obj_name:value of 'Key 1'
frame,obj_key= line.split(" ")
obj,value=obj_key.split(",")
bpy.context.scene.frame_set( int( frame ))
bpy.context.scene.objects.active = bpy.data.objects[ obj ]
bpy.context.object.data.shape_keys.key_blocks['Key 1'].value = float(value)
bpy.context.object.data.shape_keys.key_blocks['Key 1'].keyframe_insert('value')
Result:
Regarding you comments on automatise the rendering you might find these posts interesting:
Parsing XML is not blender related but you should find examaples on SO: