if it needs to keep up then you may have to rerun it every now and then, but you could script a direct feed from your back-end and build the file that way, if the site i small(ish) then you could have it update automatically, providing it doesn't time your server out
I would be happy to help you put one together like:
http://foxydrop.com/sitemap.xml, this automatically pulls the info from the db, as it is mainly used by spiders I have not yet made it a standalone file that generates itself. You can extend your sitemap to include as much information as you want, but it would be the time to construct it that I think you're having a few issues with if I'm not mistaken.
Rob