I noticed that when using SimpleXMLElement on a document that contains those CDATA tags, the content is always NULL. How do I fix this?
Also, sorry for spamming about XML here. I have been trying to get an XML based script to work for several hours now…
<content><![CDATA[Hello, world!]]></content>
I tried the first hit on Google if you search for “SimpleXMLElement cdata”, but that didn’t work.
You’re probably not accessing it correctly. You can output it directly or cast it as a string. (in this example, the casting is superfluous, as echo automatically does it anyway)
You might have better luck with
LIBXML_NOCDATA: