What I want to do is to read a xml file that contains some python code inside.
And then run these code.
For example, the xml file contains print 'Hello World'
I want to use a function such as like 
def RunXML(xml):
This function will read the code from the xml file and execute it. In this case, the function RunXML will print 'Hello World'.
Appreciate for any help.
To execute python code from python you can use exec function, about reading from xml - you didn't provide any information about xml file structure.
How to read a xml file and covert it to python code and run?