Actually I was suggesting using it for the xml output, but using it for the sql generation is in interesting angle too. probably a bit overkill though.
Overkill maybe, but sometimes I find myself writing half a templating engine just to build up some SQL string and then wondering why I didn't just start with one.