I'm using xml sitemap for a long time now and it's indeed an excellent product. However, one important function is missing in your script, well it's my opinion. It would be AMAZING to be able to resume the sitemap generation instead create a entire new sitemap each time we want to add some pages. My website is large with thousand of pages and it take around two hours in my dedicated server to crawl the site. Why don't you create the possibility to skip the pages that already exist in the sitemap and add only the new url? Just my 2 cents
Thanks for your attention.