I didn’t hear big announcement of it, but deep in the docs (? PHP 5.1.0) you’ll find a note about additional Libxml parameters. In there you’ll learn about “LIBXML_NOCDATA,” and it works like this:
simplexml_load_string($xmlraw, ’SimpleXMLElement’, LIBXML_NOCDATA);
Without that option (and with all previous versions of PHP/SimpleXML), SimpleXML just ignores any < ![CDATA[...]]> ‘escaped’ content, such as you’ll find [...]
Posted April 12, 2006 by Casey
Categories: Technology. Tags: cdata, cdata in php, fixed, parsing rss, php, php5, rss, simplexml, xml. 6 Comments.
Everybody likes documentation. The Zend folks posted this overview and SimpleXML introduction The O’Reilly folks at ONLamp offered this guide to using SimpleXML. Of course, there’s always the SimpleXML docs at PHP.net.
Two problems: I haven’t encountered CDATA in my XML yet, but I do hope to develop a better solution than offered here when I [...]
Posted November 22, 2005 by Casey
Categories: Technology. Tags: cdata, docs, documentation, php, php5, simplexml, xml, xml server. 5 Comments.