I want to generate an xml page in php but I found the problem at decoding / encoding special characters for example ""é""
myCode :
<?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>
but i get this message
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.
(Reference)
Use this instead
The
&must be encoded as&OR use it within a CData section. It says that the following text isn’t markup, but it character data instead.