Re: Bug or working as intended with PEAR XMLParser ?
| From: | Daniel O'Connor | Date: | Thu, 19 Feb 2009 23:28:03 +0000 |
| Subject: | Re: Bug or working as intended with PEAR XMLParser ? | ||
| References: | 1 | Groups: | php.pear.general |
| Request: | Send a blank email to pear-general+get-29715@lists.php.net to get a copy of this message | ||
>
> By changing my XML to:
>
> <Email><![CDATA[suppéort@hotel.com]]><%21%5BCDATA%5Bsupp%C3%A9ort@hotel.com%5D%5D>
> </Email>
> I manage to fix this behaviour but unfortunately in the real application I
> won't have the possibility to change the XML, therefore it has to work
> without that.
>
It might actually be worth looking into the simplexml extension for PHP.
http://au2.php.net/simplexml
It's built into PHP5, less like to have charset/encoding problems, and
pretty easy to use.
$sxe = simplexml_load_string('<xml />');
print_r($sxe->xpath('/path/to/joy'));