Please help me here. I got this error
<Name>secret CAKES & CAFÉ imited</Name> XML Parsing Error: undefined entity Location: http://localhost/xml.php
in my php
htmlentities($row['companys'],ENT_QUOTES)
É - A valid HTML object, but not a valid XML object (unless you define it).
É
Use htmlspecialchars instead.
htmlspecialchars
Make sure your XML document also defines the correct encoding.
Your XML file is invalid because É is not the default character character for XML documents.
You must replace it with É or correctly encode it.
É
& Eacute; is an html object, not xml, so you can only use html or xhtml documents, not XML documents.
For xml
http://en.wikipedia.org/wiki/List_of_XML_and_HTML_character_entity_references#Predefined_entities_in_XML
You must leave all other objects as Unicode characters in your XML document, and then if you need to convert them to html objects, do this when you display the data from your xml, and not when you create your XML document (then yes, é is converted after parsing xml)
Alternatively, you can define additional html objects in your XML document. This comment on the php htmlentities page uses this method
http://www.php.net/manual/en/function.htmlentities.php#84327
htmlspecialchars($row['companys'],ENT_QUOTES)