String in variable as classname?

Heylo!

Does anyone know how to put a variable string as a class name?
I’m loading certain variables from a XML file as follows:

temp_template = db_vars.childNodes[1].childNodes*.childNodes[2].childNodes[0];

db_vars is a XML variable.
Now I’d like to declare ‘template’ as a class object. The name of the class is in ‘temp_template’.

var template:temp_template;

won’t work… anyone any idea how to handle this? thanks!