Computer Talk Discussions here pertain to mods, troubleshooting, and PC/console gaming

Easy way to create XML Sitemaps?

Thread Tools
 
Search this Thread
 
Old Jun 21, 2006 | 01:00 PM
  #1  
Cebby's Avatar
Thread Starter
Registered User
 
Joined: Sep 2002
Posts: 11,199
Likes: 2
From: Pittsburgh, PA
Easy way to create XML Sitemaps?

I'm looking into submitting my websites to Google for indexing in their search engines. I've submitted the URL, but to do a sitemap, they want an XML format - to create it it must be hand coded it appears - seems pretty cumbersome.

Is there a tool out there that will automatically generate this XML file instead of having to manually code it?

I'm able to hand code it if I have to, but I have 10 sites and was hoping for a shortcut.

Thanks!
Reply
Old Jun 21, 2006 | 01:09 PM
  #2  
photoleif's Avatar
Contributing Member
 
Joined: Jan 2005
Posts: 662
Likes: 0
From: Dolores, CO
could you just put your page URLs into one column in excel, and form the rest of the code using concatenation? that way what you type are the page.htm or page.xml -- however they're written, even page.js (just list the page names) and use excel to rapidly create the rest of the code. post an example (if you could) of how google wants it? it would be three columns perhaps -- A to show the first part of the URL, B containing your page names, and C with the rest of each line... then D could be =A1&B1&C1 to make the rest. if you paste in double-quotes off the example into A and C, you won't have to replace a placeholder like ' (apostrophe) in some other app.

edit: oh wait. XML uses single quotes, doesn't it? then you're set...

Last edited by photoleif; Jun 21, 2006 at 01:28 PM.
Reply
Old Jun 21, 2006 | 01:22 PM
  #3  
Cebby's Avatar
Thread Starter
Registered User
 
Joined: Sep 2002
Posts: 11,199
Likes: 2
From: Pittsburgh, PA
Here's their instructions:

http://www.google.com/webmasters/sit.../protocol.html

Here's the simple version for one URL:

Code:
<?xml version="1.0" encoding="UTF-8"?>
  < urlset xmlns="http://www.google.com/schemas/sitemap/0.84">
   < url>
    < loc>http://www.example.com/</loc>
    < lastmod>2005-01-01</lastmod>
    < changefreq>monthly</changefreq>
    < priority>0.8</priority>
   </url>  
  </urlset>
And their one with multiple URL's:

Code:
<?xml version="1.0" encoding="UTF-8"?>
<urlset xmlns="http://www.google.com/schemas/sitemap/0.84">

   <url>
      <loc>http://www.example.com/</loc>
      <lastmod>2005-01-01</lastmod>
      <changefreq>monthly</changefreq>
      <priority>0.8</priority>
   </url>
   <url>
      <loc>http://www.example.com/catalog?item=12&amp;desc=vacation_hawaii</loc>
      <changefreq>weekly</changefreq>
   </url>
   <url>
      <loc>http://www.example.com/catalog?item=73&amp;desc=vacation_new_zealand</loc>
      <lastmod>2004-12-23</lastmod>
      <changefreq>weekly</changefreq>
   </url>
   <url>
      <loc>http://www.example.com/catalog?item=74&amp;desc=vacation_newfoundland</loc>
      <lastmod>2004-12-23T18:00:15+00:00</lastmod>
      <priority>0.3</priority>
   </url>
   <url>
      <loc>http://www.example.com/catalog?item=83&amp;desc=vacation_usa</loc>
      <lastmod>2004-11-23</lastmod>
   </url>
</urlset>
Like I said - not difficult at all, just sort of time consuming with the number of sites I have.
Reply
Old Jun 21, 2006 | 01:35 PM
  #4  
photoleif's Avatar
Contributing Member
 
Joined: Jan 2005
Posts: 662
Likes: 0
From: Dolores, CO
if you could get an ls output of your sites, then you could redirect that to a delimited textfile to show the titles and last modified. then the rest would work in excel with a tiny help from word or something that understands how to make a hard return. to use my example from above, your cells in column A might contain:

<url><loc>

then B contains your page names like index.htm

then C contains

</loc><lastmod>

and D contains your formatted date string

and E contains

</lastmod><changefreq>weekly</changefreq></url>

and finally, F is =A1&B1&C1&D1&E1

that makes it one big heinous string. copy all those cells out of F and paste into word as text, then do a global search and replace to insert the hard returns and indentations where they belong. for word, ^p (caret-lower p) is a hard return like you would like.

it might sound like a lot of silly work, but really it goes very rapidly. if you want to send me the list of page names and last modified dates, i'd be happy to do this for you. should take 5 mins...
Reply
Old Jun 21, 2006 | 07:55 PM
  #5  
photoleif's Avatar
Contributing Member
 
Joined: Jan 2005
Posts: 662
Likes: 0
From: Dolores, CO
cebby did that help?
Reply
Old Jun 22, 2006 | 06:28 AM
  #6  
Cebby's Avatar
Thread Starter
Registered User
 
Joined: Sep 2002
Posts: 11,199
Likes: 2
From: Pittsburgh, PA
Sorry - I got sidetracked last night. I'm going to attempt this later today/tonight. If am understanding correctly, your way should be pretty easy. Thanks!!
Reply
Old Jun 22, 2006 | 07:16 AM
  #7  
WATRD's Avatar
Contributing Member
 
Joined: Oct 2002
Posts: 5,089
Likes: 0
From: Duvall, WA
http://www.coffeecup.com/google-sitemapper/

No muss, no fuss.
Reply
Old Jun 22, 2006 | 09:04 AM
  #8  
photoleif's Avatar
Contributing Member
 
Joined: Jan 2005
Posts: 662
Likes: 0
From: Dolores, CO
looks like a winner. good find rob. i've used coffeecup before. great company.
Reply
Old Jun 25, 2006 | 08:55 AM
  #9  
Cebby's Avatar
Thread Starter
Registered User
 
Joined: Sep 2002
Posts: 11,199
Likes: 2
From: Pittsburgh, PA
That's the easy way I was looking for. Thanks Rob. Leif - you taught me another way to create files that I never would have thought of - great shortcuts! I love it when I learn something new...

On the Coffeecup software...

Odd thing - when I have it crawl my forum sites, it seems to index the site over and over again throwing a bunch of "&amp" in the results.

It is pulling thousands of URL's - my only guess is that it is not only indexing forums and threads, but also individual posts.
Reply
Old Jun 25, 2006 | 09:00 AM
  #10  
WATRD's Avatar
Contributing Member
 
Joined: Oct 2002
Posts: 5,089
Likes: 0
From: Duvall, WA
Originally Posted by Cebby
On the Coffeecup software...

Odd thing - when I have it crawl my forum sites, it seems to index the site over and over again throwing a bunch of "&amp" in the results.

It is pulling thousands of URL's - my only guess is that it is not only indexing forums and threads, but also individual posts.
Yep, it will do that, unless you go into the setup page and tell it to not follow links that constructed a particular way, like forum posts.
Reply
Old Jun 25, 2006 | 09:14 AM
  #11  
Cebby's Avatar
Thread Starter
Registered User
 
Joined: Sep 2002
Posts: 11,199
Likes: 2
From: Pittsburgh, PA
Originally Posted by WATRD
Yep, it will do that, unless you go into the setup page and tell it to not follow links that constructed a particular way, like forum posts.
I excluded a bunch of stuff already, just gotta figure out the individual post....

Duh.... showpost.php
Reply
Old Jun 26, 2006 | 06:39 AM
  #12  
Jared's Avatar
Contributing Member
 
Joined: Jun 2005
Posts: 545
Likes: 0
From: Ft. Collins, Co
I don't know how programming friendly you are, but if you are so inclined, you can learn Python. It has great library support for XML, and although you are still sort of writing everything by hand, at least you can write a program once, and use it over and over again. I use Python all the time for seemingly complicated things like this, and they always end up being really simple in Python.
Reply
Old Jun 26, 2006 | 07:19 AM
  #13  
Cebby's Avatar
Thread Starter
Registered User
 
Joined: Sep 2002
Posts: 11,199
Likes: 2
From: Pittsburgh, PA
I'd classify my skills as novice, but I've made a concerted effort to learn html and php. I typically use Dreamweaver to create stuff from scratch and but I have no problem going in and manually editing code with either PhpDesigner or Notepad to edit php files. Not that it applies here, but I'm now pretty well versed on vBulletin, phpBB, Gallery, and OS Commerce.

Not familiar with Python, I'll need to look into that.
Reply
Related Topics
Thread
Thread Starter
Forum
Replies
Last Post
punks_is_4x4
86-95 Trucks & 4Runners
1
Feb 26, 2016 04:29 PM
kbpickens
Newbie Tech Section
5
Oct 2, 2015 03:37 PM
hiluxinargentina
86-95 Trucks & 4Runners
3
Sep 30, 2015 05:51 PM
JookUpVandetti
86-95 Trucks & 4Runners
10
Sep 30, 2015 08:58 AM
Odin
86-95 Trucks & 4Runners
3
Sep 26, 2015 06:56 PM




All times are GMT -8. The time now is 03:38 PM.