convert xml template to swig