We have written a module to dynamically produce sitemap.xml files for your managed websites, now available on the Sitecore Marketplace. The module is open source, and fully documented on its GitHub page.