note 61495 deleted from function.simplexml-load-file by danbrown
| From: | danbrown@php.net | Date: | Thu, 24 Jul 2008 13:31:31 +0000 |
| Subject: | note 61495 deleted from function.simplexml-load-file by danbrown | ||
| References: | 1 | Groups: | php.notes |
| Request: | Send a blank email to php-notes+get-142655@lists.php.net to get a copy of this message | ||
Note Submitter: Bart Verkoeijen
----
No problems at all with CDATA:
Test.xml:
<?xml version="1.0" encoding="iso-8859-1"?>
<xml>
<cdata><![CDATA[abc<br>abc]]></cdata>
</xml>
PHP Code:
<?php
$xml = simplexml_load_file( 'test.xml' );
echo $xml->cdata;
?>
Output:
> X-Powered-By: PHP/5.1.1
> Content-type: text/html
>
> abc<br>abc
The problem below is probably caused by incorrect syntax. It's "<![CDATA[]]>"
instead of "<![CDATA []]>" (note the space).