链接上的命名空间前缀 xhtml 未定义 - sitemap.xml

2024-04-18

我试图将语言添加到我的 sitemap.xml 文件中,但收到“链接上的命名空间前缀 xhtml 未定义”错误。我如何定义它?我在谷歌上找不到任何有用的东西。

这是文件:

<?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">
<!-- created with Free Online Sitemap Generator www.xml-sitemaps.com -->
  <url>
    <loc>https://www.leepio.dk/</loc>


</urlset>

这样就可以完成工作了。

Change

<urlset
    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
    http://www.w3.org/1999/xhtml http://www.w3.org/2002/08/xhtml/xhtml1-strict.xsd"
    xmlns="http://www.sitemaps.org/schemas/sitemap/0.9"
    xmlns:xhtml="http://www.w3.org/1999/xhtml"   
>

解释

定义xmlns:xhtml如所给出的。绘制地图xmlns:xhtml到存储模式的地方http://www.w3.org/2002/08/xhtml/xhtml1-strict.xsd http://www.w3.org/2002/08/xhtml/xhtml1-strict.xsd.

本文内容由网友自发贡献,版权归原作者所有,本站不承担相应法律责任。如您发现有涉嫌抄袭侵权的内容,请联系:hwhale#tublm.com(使用前将#替换为@)

链接上的命名空间前缀 xhtml 未定义 - sitemap.xml 的相关文章

随机推荐