我有一個codeigniter項目。我需要將其提交給Google網站管理員工具,爲此我必須將XML格式的網站地圖提交給Google。 Soe我在我的本地主機上創建了一個動態站點地圖生成腳本(Xampp 3.2.2)。所有的都很好,我得到這個XML瀏覽器中呈現:XML解析錯誤預計:</link>
<?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">
<url>
<loc>http://localhost/moulana_online/site/home</loc>
<lastmod>2016-03-03T10:27:22-08:00</lastmod>
<changefreq>hourly</changefreq>
<priority>0.8</priority>
</url>
<url>
<loc>http://localhost/moulana_online/site/about-us</loc>
<lastmod>2015-11-22T00:41:38-08:00</lastmod>
<changefreq>hourly</changefreq>
<priority>0.8</priority>
</url>
<url>
<loc>http://localhost/moulana_online/site/our-mission</loc>
<lastmod>2015-11-22T01:24:30-08:00</lastmod>
<changefreq>hourly</changefreq>
<priority>0.8</priority>
</url>
<url>
<loc>http://localhost/moulana_online/site/moulana-dr-nabi-raza-abidi</loc>
<lastmod>2015-11-30T17:29:32-08:00</lastmod>
<changefreq>hourly</changefreq>
<priority>0.8</priority>
</url>
<url>
<loc>http://localhost/moulana_online/site/contact-us</loc>
<lastmod>2015-11-16T03:00:53-08:00</lastmod>
<changefreq>hourly</changefreq>
<priority>0.8</priority>
</url>
</urlset>
但只要我上傳我的腳本生活網站(http://www.moulanaonline.com/sitemap)主辦IIS服務器上。它給了我這個錯誤:
XML Parsing Error: mismatched tag. Expected: </link>.
Location: http://www.moulanaonline.com/sitemap
Line Number 69, Column 3:
</head>
--^
我仍然無法弄清楚這一點。任何幫助,將不勝感激。
您提供的xml不是您正在使用的xml,因爲它甚至沒有'69'行。請用正確的數據更新問題。 – Rao