...From my experience generating code from XML using XSLT is one of the best and fastest solutions.
This is just the base of the framework presenting the idea, any code template can be implemented upon request.
Some sample generators are present for SQL / PLSQL / C# / AnsiC / Java
The main target is to generate DTO/BDO/POJO objects based on the database definitions in multiple languages aligning all technologies used by a development team.
If you are willing to contribute drop a message.
This is a sample implementation of the TransQuery processing model, enabling the use of XSLT as a query language over multiple XML documents. See <a href="http://www.xmlportfolio.com/transquery">http://www.xmlportfolio.com/transquery</a> for more info.