我想在 php 中生成一个 xml 页面,但我在解码/编码特殊字符时发现了问题,例如""é""
我的代码:
<?xml version="1.0" encoding="UTF-8"?>
<urlset xmlns="http://www.google.com/schemas/sitemap/0.84">
<url>
<loc> é test è </loc>
<priority>1.000</priority>
<changefreq>always</changefreq>
</url>
</urlset>
但我收到了这条消息
This page contains the following errors:
error on line 4 at column 19: Entity 'eacute' not defined
Below is a rendering of the page up to the first error.