ColdFrame is an open-source code generator backend for use with UML tools.
In its present state, it's targeted at ArgoUML and generates Ada code frameworks.
The intermediate representation uses XML.
The code generation uses the XSL Transformation (XSLT) language, so - with an investment in time and thought - you can design your own transformation mechanisms to the programming language of your choice.
See here for more information.
There are examples.