Generating Sitemaps

A long time ago (okay 2009) on an entirely different blog, I introduced v0.1 of the SitemapGenerator. This was a command line tool that I was running once an hour to monitor my blog, and if anything had changed it would re-generate a sitemap and notify Google of the changes. I wanted this predominantly so that a Google custom search engine would stay up-to-date, something I no longer need to worry about given that I use Postvorta to index all my blogs. I haven't used the code in a number of years but recently I again need to generate a sitemap. This time though I wanted to generate the file from within the web application I was building rather than via a separate recurring script.

I did a quick search for a better version than my original, and while I found a few Java libraries none really met my requirements; I wanted something lightweight that would allow me to take advantage of the extensions to the protocol Google has introduced for documenting images, videos and news articles. So I went back and re-wrote the guts of my original application. The new and improved version now supports a simple API that I can call from within my web application (although I've maintained the command line tool in case anybody was still using it).

If you are interested then you can grab the new version direct from SVN.


  1. Mark, many thanks.
    You tell me if I need it. Checked all the links and have made a (hasty) decision that I don't.
    I'm not sure though....never am with you. Until you tell me I need it. Then I jump into action. Well I copy and paste what you tell me to and where you tell me to.
    Cheers and have a wonderful year.

    1. Adrian, you should be fine without a sitemap. They are really most useful when creating a brand new site that search engines have never seen before or if you make drastic structural changes to an existing site.

      Fortunately as Google own blogger they are fairly good at ensuring our blogs get indexed fairly regularly. If, however, you find that there are pages on your blog that never show up in a Goolge search then a sitemap could be useful. Unfortunately you can't create one for a Google hosted blog as there is no way to upload a random file to your blog. However, Google do accept RSS feeds as a form of sitemap so you can use the automatic feed of your blog if you needed to.

      In summary though I wouldn't bother doing anything in your case.