1. Advertising
    y u no do it?

    Advertising (learn more)

    Advertise virtually anything here, with CPM banner ads, CPM email ads and CPC contextual links. You can target relevant areas of the site and show ads based on geographical location of the user if you wish.

    Starts at just $1 per CPM or $0.10 per CPC.

Site map error

Discussion in 'Google Sitemaps' started by mehbooba, Apr 3, 2006.

  1. #1
    can someone please help.

    I have created a sitemap for a certain part of my website.

    the url is :

    http://www.mehbooba.co.uk/poemsandpoetry/sitemap.xml

    when I try to parse it (load it via IE) i get the error :


    The XML page cannot be displayed
    Cannot view XML input using XSL style sheet. Please correct the error and then click the Refresh button, or try again later.

    --------------------------------------------------------------------------

    A semi colon character was expected. Error processing resource 'http://www.mehbooba.co.uk/poemsandpoetry/sitemap.xml'. Lin...

    <loc>http://www.mehbooba.co.uk/poemsandpoetry/index.php?action=article&cat_id=001001001&id=1&am...



    Not much help... so I loaded it via Opera and I get the following error :



    ML parsing failed: not well-formed (Line: 10, Character: 92)

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

    <url>
    <loc>http://www.mehbooba.co.uk/poemsandpoetry/</loc>
    <changefreq>weekly</changefreq>
    <priority>0.5</priority>
    </url>
    <url>
    <loc>http://www.mehbooba.co.uk/poemsandpoetry/index.php?action=article&cat_id=001001001&id=1&lang=en/</loc>
    <changefreq>weekly</changefreq>
    <priority>0.5</priority>
    </url>
    <url>
    <loc>http://www.mehbooba.co.uk/poemsandpoetry/index.php?action=article&cat_id=001001001001&id=4&lang=en/</loc>
    <changefreq>weekly</changefreq>
    <priority>0.5</priority>
    </url>
    <url>
    <loc>http://www.mehbooba.co.uk/poemsandpoetry/index.php?action=article&cat_id=001001001001&id=3&lang=en/</loc>
    <changefreq>weekly</changefreq>
    <priority>0.5</priority>
    </url>
    .
    .
    .
    .



    Line 10, is the second url in the sitemap :

    <loc>http://www.mehbooba.co.uk/poemsandpoetry/index.php?action=article&cat_id=001001001&id=1&lang=en/</loc>
    SEMrush
    character 92 is the '=' after cat_id

    If I copy and paste the whole of that url, its loads the page perfectly fine. So why is it giving errors when parsin ?

    Any help would be appreciated.
     
    mehbooba, Apr 3, 2006 IP
    SEMrush
  2. softplus

    softplus Peon

    Messages:
    79
    Likes Received:
    3
    Best Answers:
    0
    Trophy Points:
    0
    #2
    Your sitemap generator is broken. Which one are you using? You might want to compare the generated file to one generated by a working sitemap generator (like my GSiteCrawler, shameless plug :D).

    The problem is that the "&" (ampersand) in the URL should be HTML encoded, eg instead of "&" you should be using "&amp;". So a line like
    <loc>http://www.mehbooba.co.uk/poemsandpoetry/index.php?action=article&cat_id=001001001&id=1&lang=en/</loc>
    should be
    <loc>http://www.mehbooba.co.uk/poemsandpoetry/index.php?action=article&amp;cat_id=001001001&amp;id=1&amp;lang=en/</loc>

    (you could also just search+replace, but who knows what other errors might be hidden in that file as well, if the generator can't handle something as basic as that)

    PS setting all the URLs to the same change frequency and priority won't change anything :). Google currently only collects this information for statistical reasons (to see if it is worth anything), but by setting all URLs to the same values you're effectively giving them "no data" (no relative differences among the URLs). You could drop that information or perhaps fill it with something "real" -- at the very least push your main URL(s)
     
    softplus, Apr 3, 2006 IP
  3. DangerMouse

    DangerMouse Peon

    Messages:
    275
    Likes Received:
    11
    Best Answers:
    0
    Trophy Points:
    0
    #3
    Try URL encoding the ampersands ("&" -> "&amp;") in the URL field

    ;)
     
    DangerMouse, Apr 3, 2006 IP
  4. mehbooba

    mehbooba Peon

    Messages:
    260
    Likes Received:
    11
    Best Answers:
    0
    Trophy Points:
    0
    #4
    hey cheers guys.... i have my own sitemap generator.. wrote it in php. As the data is in a database... i knew best how to traverese it.. so made my own php program to create the sitemap.... i overlooked the encoding part (eg &).... is there a webiste where it provides a list of other characters i should look out for and ensure the equivalent html code is insterted instead of the actual character.

    thanks once again.
     
    mehbooba, Apr 3, 2006 IP
  5. softplus

    softplus Peon

    Messages:
    79
    Likes Received:
    3
    Best Answers:
    0
    Trophy Points:
    0
    #5
    If you're using php you can just use the built in htmlspecialchars() function :)
     
    softplus, Apr 3, 2006 IP
  6. mehbooba

    mehbooba Peon

    Messages:
    260
    Likes Received:
    11
    Best Answers:
    0
    Trophy Points:
    0
    #6
    softplus..... cool.... many thanks.... appreciated.
     
    mehbooba, Apr 3, 2006 IP
  7. DangerMouse

    DangerMouse Peon

    Messages:
    275
    Likes Received:
    11
    Best Answers:
    0
    Trophy Points:
    0
    #7
    DangerMouse, Apr 3, 2006 IP