Sitemap xml codes...

Discussion in 'Google Sitemaps' started by tptnyc, Mar 25, 2008.

  1. #1
    Does this entire thing has to be pasted on the top before all the URLs pages?

    <?xml version="1.0" encoding="UTF-8" ?>
    - <urlset xmlns="http://www.sitemaps.org/schemas/sitemap/0.9" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.sitemaps.org/schemas/sitemap/0.9 http://www.sitemaps.org/schemas/sitemap/0.9/sitemap.xsd">

    OR
    We can simply use the following:

    <?xml version="1.0" encoding="UTF-8"?>
    < urlset xmlns="http://www.sitemaps.org/schemas/sitemap/0.9">
    < url>
    < loc>http://www.example.com/index.html</loc>
    < changefreq>weekly</changefreq>
    < priority>0.5</priority>
    </url>
     
    tptnyc, Mar 25, 2008 IP
  2. paul_delaney

    paul_delaney Peon

    Messages:
    45
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #2
    I think you only need to declare it once. HTH
     
    paul_delaney, Mar 25, 2008 IP
  3. tptnyc

    tptnyc Peon

    Messages:
    764
    Likes Received:
    5
    Best Answers:
    0
    Trophy Points:
    0
    #3
    Out of these two which one to use and what's the difference?

    <?xml version="1.0" encoding="UTF-8"?>
    < urlset xmlns="http://www.sitemaps.org/schemas/sitemap/0.9">

    OR

    <?xml version="1.0" encoding="UTF-8"?>
    <urlset xmlns="http://www.google.com/schemas/sitemap/0.84">
     
    tptnyc, Mar 25, 2008 IP
  4. websitetools

    websitetools Well-Known Member

    Messages:
    1,513
    Likes Received:
    25
    Best Answers:
    4
    Trophy Points:
    170
    #4
    websitetools, Mar 25, 2008 IP
  5. tptnyc

    tptnyc Peon

    Messages:
    764
    Likes Received:
    5
    Best Answers:
    0
    Trophy Points:
    0
    #5
    Still not clear. If I paste script coding like this at the top followed by 50 pages URLs in sitemap.xml file, will this be ok?

    <?xml version="1.0" encoding="UTF-8"?>
    < urlset xmlns="http://www.sitemaps.org/schemas/sitemap/0.9">
    < url>
    < loc>http://www.example.com/index.html</loc>
    < changefreq>weekly</changefreq>
    < priority>0.5</priority>
    </url>
    and so on so forth....all the urls

    </urlset>
     
    tptnyc, Mar 25, 2008 IP
  6. vinod.kumar

    vinod.kumar Banned

    Messages:
    13
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #6
    no it should e in the page sitemap.xml
     
    vinod.kumar, Mar 26, 2008 IP
  7. jonbuoy

    jonbuoy Peon

    Messages:
    284
    Likes Received:
    4
    Best Answers:
    0
    Trophy Points:
    0
    #7
    Yes - each separate page needs to be contained within < url> and < /url> tags (without the spaces) and all these need to be contained within the urlset tags.

    The first line containing the XML version appears only once.
     
    jonbuoy, Mar 26, 2008 IP
  8. SimThePhpCoder

    SimThePhpCoder Well-Known Member

    Messages:
    949
    Likes Received:
    3
    Best Answers:
    0
    Trophy Points:
    108
    #8
    I thought there was a desc tag?
     
    SimThePhpCoder, Mar 26, 2008 IP