Right now I’ve hard coded the whole xml file in my python script and just doing out.write(), but now it’s getting harder to manage because i have multiple types of xml file.
What is the easiest and quickest way to setup templating so that I can just give the variable names amd filename?
You asked for the easiest and quickest, so see this post: http://blog.simonwillison.net/post/58096201893/simpletemplates
If you want something smarter, take a look here.