Google Sitemap XML Generator v1.33

September 13, 2007 by Mike Henke    19 Comments
Posted under: Google Sitemap XML Generator

Google Sitemap XML Generator v1.33

CHANGE LIST for 1.33 – 2007/09/13
Added Escaping Entities
Added Technorati.com pinging

19 Comments + Add Comment

  • Michael Evangelista

    Hi Mike - thanks for this super-slick tool. I've just begun to see what it does, and what to do with the xml it creates - but I had a tiny issue right off that was easy to fix but might be a stumbling block for some folks.

    On running the sitemap.cfm page code 'out of the box', my initial xml file returned an error about the xml declaration not being at the start of the document when attempting to view the raw xml in a browser (i.e. http://mysite.com/sitemap.xml )

    The fix was simply to remove the whitespace before the opening ?xml statement in the cfsavecontent section of the cfc.

    I also had a bunch of blank lines between each url node in the xml.

    I think, because this is using cfsavecontent, the whitespace gets preserved when creating the cfoutput for the xml write.

    Again - nothing major, just a tiny tweak. Overall I am super impressed by how easy this was to use - thanks again!

  • Mike

    Thanks. I will have to look @ that. I am working on adding google code search and speed up the generator. I think I was using a trim on the file create but might not have been in the download example.

  • Michael Evangelista

    Its been an interesting 24 hours. After much hoop-jumping and pulling of hair, I managed to connect a sitemap generated with your code (that was the super easy part... no hair loss there at all) to Ray Camden's "Verity via sitemap" code, creating a self-contained site-search apparatus with lots of custom control. Very cool - thanks again!

  • Michael Evangelista

    UPDATE: this quick demo lets you run a sitemap on any site: http://www.mredesign.com/demos/verity-sitemap/index.cfm
    ( I took out the submission part and limited levels to 2)

    No apparent problems at all with the xml format.

  • Michael Evangelista

    On the whitespace thing - seems to only happen on my CF7 sites, but works fine on CF8.

  • Dwayne

    This may be a dumb question,but would I be able to use the for a Wordpress blog I have? thanks for your help.

  • Super Mario

    Of course yo can, they are compatible with almost all sites.

  • michaels craft store

    i agree with you..it's compatible with majority of sites..

  • sabul

    i've tested it and all goes well..no problem bro

  • Mike Henke

    Anyone interested in refactoring the code or adding enhancements let me know. It isn't getting the attention needed by me.

  • perniagaan internet

    thanks for that inspiring post there

  • Mike Henke

    The code works fine as you can see no complaints but could use some TLC.

  • Thanks. I will have to look @ that. I am working on adding google code search and speed up the generator. I think I was using a trim on the file create but might not have been in the download example.

  • Mike Henke

    Send me your email address and I'll add you to the riaforge project.

  • Dwayne West

    Is there a program like this to create sitemaps for Wordpress blogs? Thank you for your answer in advance.

  • Barber shears

    These days you can not index all pages of your site in google without google xml sitemap. Thanks for the link

  • Justin

    Is there an issue with scanning relative to root links? For instance: href="/cart/checkout

    Turns into http://www.mysite.com//cart/checkout in the xml file. Thanks!

  • Justin

    Hmmm, it seems that this was the culprit around line #227

    <code>
    <loc>#arguments.root#/#cleanURL#</loc>

    Change to:
    <loc>#arguments.root#<cfif not left(cleanURL,1) is "/">/</cfif>#cleanURL#</loc>
    </code>

    Now I'll just change it to a regex and put it in the cleanURL chunk of code.

    Awesome tool by the way, so easy to use.

  • Miami Houses, Atlanta Houses

    thanks for the sitemap it has be helpful to me most especially the codes.

  • Got anything to say? Go ahead and leave a comment!