Hmm. What exactly does it mean to build XML/JSON responses out of the template?
It is the same as for any other template, too. You have a prepared document at hand where you can replace the placeholders with real values. Doing this for a structured response is surely not a good idea. Generating the response in a structured way is more reliable and has less potential for the usual traps.
But there is a threshold when the complexity of the response structure is far bigger then the needed diversity of requests/responses. In those cases building a structure that can properly generate a request or response if you only need a simple things would be overkill.
I generate SOAP requests. SOAP is utterly complex and the ratio of gain/complexity is really really small. The API we have to deal with is complex, too. And we need only a handful calls from the whole API. So I hope you can see that there are reasons to take a less clever approach. And it is a approach I can do with pharo ;)
Norbert