【发布时间】:2015-05-15 18:07:47
【问题描述】:
我已将我的 sitemap.xml 提交到谷歌网站管理员工具中。我们发现诸如“无法解析 XML 站点地图,因为它包含一个或多个未绑定的命名空间前缀。例如,在没有事先 xmlns:xhtml="http://www.w3. org/1999/xhtml"。"
【问题讨论】:
标签: xhtml sitemap google-search-console xml-sitemap bing-webmaster-tools
我已将我的 sitemap.xml 提交到谷歌网站管理员工具中。我们发现诸如“无法解析 XML 站点地图,因为它包含一个或多个未绑定的命名空间前缀。例如,在没有事先 xmlns:xhtml="http://www.w3. org/1999/xhtml"。"
【问题讨论】:
标签: xhtml sitemap google-search-console xml-sitemap bing-webmaster-tools
您的 XML 文件中的第一行似乎格式错误。似乎把网址粘贴了两次,可能是错误的:
<urlset xsi:schemaLocation="http://www.sitemaps.org/schemas/sitemap/0.9 http://www.sitemaps.org/schemas/sitemap/0.9/sitemap.xsd">
试试这一行:
<urlset xmlns="http://www.sitemaps.org/schemas/sitemap/0.9">
【讨论】:
xmlns。非常感谢!
有同样的问题。 尝试在顶部添加此内容
<?xml version="1.0" encoding="UTF-8"?>
<urlset xmlns="http://www.sitemaps.org/schemas/sitemap/0.9">
【讨论】: