The most recent version of SGSV does support XLST based templates. Basically this is the same as the XMLdb with the added features of the filters available.
So, if you have the T-SQL that will flatten the UDT as required ... you can add the "for XML" parameters for use with an XSLT script. At this point you, you can use the script to wrap the data in the Select.
As for re-creating the file on a scheduled bag, this gets difficult as SGSV and XMLdb are expect to be on a page. You can have the page auto-refresh, but a user must navigate to the page.
So, to have a schedule "solution" you will need to develop a DLL that the scheduler can call. This DLL will have to implement the functionality of executing the T-SQL and processing the result with an XSLT script. Doable, but may not be what you are want to tackle.
Hope this helps.
Paul.