Hello,
I would start by taking a look at the sample xml templates that ship with CodeSmith. This will give you a rough idea how to work with xml inside of a template. There are various ways one can script a database using xml. The .netTiers set of templates uses xml to generate the stored procedures. Take a look at .netTiers\DataAccessLayer.SqlClient\StoredProceduresXml.cst, The sample should be a good starting point on how you can script a database using an xml file. After you script the database out to a sql file or stream, you can execute the script with .net code.
Yes, there are templates available for making DotNetNuke modules using CodeSmith. You can find the templates here and a guide here.
Thanks
-Blake
Blake Niemyjski
CodeSmith Tools, LLC
Support Specialist
Blog: http://windowscoding.com/blogs/blake/
----------------------------------------------------------------------
Member of the .NetTiers team | Visit http://www.nettiers.com
----------------------------------------------------------------------