Sanırım şunu belirtmeliyim.
Aşağıda bütün sitemap.php dosyasını paylaşıyorum sizinle. Bu dosyayı başka bir sitede şu şekilde kullanıyorum ve sorunsuz çalışıyor:
<?php
include_once("veri_tabani.php");
header('Content-type: text/xml');
echo "<?xml version=\"1.0\" encoding=\"ISO-8859-9\" ?>\n";
echo "<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\">";
$xml_ciktisi .= "\n<url>\n<loc>http://www.siteadi.com</loc>\n<changefreq>daily</changefreq>\n<priority>1.00</priority>\n</url>";
$result = @mysql_query("SELECT id, title, created, sectionid FROM jos_content WHERE sectionid!='4' AND state='1' ORDER BY created DESC");
while (list($id, $title, $created) = @mysql_fetch_row($result))
{
$saat= $created;
$s = explode(" " ,$saat);
$zaman = $s[0]."T".$s[1]."+00:00";
$xml_ciktisi .= "\n<url>\n<loc>http://www.siteadi.com/devami.php?id=$id</loc>\n
<lastmod>$zaman</lastmod>\n
<changefreq>hourly</changefreq>\n
<priority>0.50</priority>\n</url>";
};
echo $xml_ciktisi ."\n</urlset>";
?>İkisi arasında bir XML farkı yok, sadece bazı MySQL bilgileri ve PHP değişkenleri değişiyor, XML hatası bu nedenle anlamsız geliyor bana.