It is been a while. But I'm back.
A lot of new Web 2.0 applications use API's. Most of the time they return XML, and some of those services do it well by encapsulating their data in CDATA-tags.
But simpleXML doesn't like CDATA. Think again. Use the code below and you will have full access to the data in the CDATA-tags.
$xml = simplexml_load_string($string, 'SimpleXMLElement', LIBXML_NOCDATA);
?>
Have fun!
Reacties
Pritesh Patel schreef:
16/10/08
Doesn't seem to work for me!
Steve schreef:
07/05/09
I see how that should work, but it doesn't appear to be working for me either.