I am looking for something that could read external data (e.g. XML) and then generate source code file. Main reason is to have single definition file and then make Visual Studio to generate C# code and IntelliJ to generate java code.
Visual Studio T4 is template engine intended to produce source code.