I have the following xml file
<?xml version="1.0" encoding="UTF-8"?>
<data>
<item name="general.global.Event"><![CDATA[EVENT!]]></item>
<item name="general.global.CompanyName"><![CDATA[some name]]></item>
<item name="general.global.CompanyImprint"><![CDATA[Legal information]]></item>
</data>
and my code is as follows
$xml = simplexml_load_file("general.xml") or die("Error: Cannot create object");
print_r($xml);
and my output is missing the CDATA.. how?
SimpleXMLElement Object
(
[item] => Array
(
[0] => SimpleXMLElement Object
(
[@attributes] => Array
(
[name] => general.global.Event
)
)
[1] => SimpleXMLElement Object
(
[@attributes] => Array
(
[name] => general.global.CompanyName
)
)
[2] => SimpleXMLElement Object
(
[@attributes] => Array
(
[name] => general.global.CompanyImprint
)
)
)
)