- Forever Young https://www.luxiyue.com/tag/sitemap/ Share Happiness,Enjoy Life~ Thu, 06 Apr 2023 08:35:29 +0000 zh-Hans hourly 1 https://wordpress.org/?v=6.8.2 https://www.luxiyue.com/wp-content/uploads/cropped-lovely-ina512-1-1-150x150.png - Forever Young https://www.luxiyue.com/tag/sitemap/ 32 32 解决网站地图sitemap错误提示:error on line 176 at column 147: EntityRef: expecting ‘;’ https://www.luxiyue.com/server/%e8%a7%a3%e5%86%b3%e7%bd%91%e7%ab%99%e5%9c%b0%e5%9b%besitemap%e9%94%99%e8%af%af%e6%8f%90%e7%a4%ba%ef%bc%9aerror-on-line-176-at-column-147-entityref-expecting/ https://www.luxiyue.com/server/%e8%a7%a3%e5%86%b3%e7%bd%91%e7%ab%99%e5%9c%b0%e5%9b%besitemap%e9%94%99%e8%af%af%e6%8f%90%e7%a4%ba%ef%bc%9aerror-on-line-176-at-column-147-entityref-expecting/#respond Thu, 09 Feb 2023 07:13:36 +0000 https://www.luxiyue.com/?p=3333 前言 今天在查看网站地图 sitemap.xml 时,发现有如下错误提示: This page contains the following errors: error on line 176 at column 147: EntityRef: expecting ';' Below is a rendering of the page up to the first erro […]

解决网站地图sitemap错误提示:error on line 176 at column 147: EntityRef: expecting ‘;’最先出现在Forever Young

]]>
前言

今天在查看网站地图 sitemap.xml 时,发现有如下错误提示:

This page contains the following errors: 
error on line 176 at column 147: EntityRef: expecting ';'
Below is a rendering of the page up to the first error.

原因

大多数浏览器在显示xml文件时,显示的并不是文件源码,而是经过 xml解析器 解析后的结果。

但是, xml解析器 在遇到字符 & 时,会把 & 当做一个实体引用的开始,而去寻找这个实体引用的结束符号 ; ,我这边遇到的就是这个问题,文件名称含有 & 字符。

解决方法

将文件名称中的 & 改为其他即可,类似 and&这些。

再次访问,可以看到问题解决:

参考文章:
XML error on line at column: EntityRef: expecting ';'

解决网站地图sitemap错误提示:error on line 176 at column 147: EntityRef: expecting ‘;’最先出现在Forever Young

]]>
https://www.luxiyue.com/server/%e8%a7%a3%e5%86%b3%e7%bd%91%e7%ab%99%e5%9c%b0%e5%9b%besitemap%e9%94%99%e8%af%af%e6%8f%90%e7%a4%ba%ef%bc%9aerror-on-line-176-at-column-147-entityref-expecting/feed/ 0