PHP simplexml Entities

Posted by FFish on Stack Overflow See other posts from Stack Overflow or by FFish
Published on 2010-05-17T16:07:54Z Indexed on 2010/05/17 16:10 UTC
Read the original article Hit count: 213

Filed under:
|
|

What's going one here?

$string = <<<XML
<?xml version="1.0" encoding="UTF-8"?>
    <album>
        <img src="002.jpg" caption="w&aacute;ssup?" />
    </album>
XML;

$xml = simplexml_load_string($string);
// $xmlobj = simplexml_load_file("xml.xml"); // same thing

echo "<pre>";
var_dump($xml);
echo "</pre>";

Error:

Warning: simplexml_load_string() [function.simplexml-load-string]: Entity: line 5: parser error : Entity 'aacute' not defined

© Stack Overflow or respective owner

Related posts about php

Related posts about simplexml