PHP: How to handle

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) $content = simplexml_load_string( ‘<content><![CDATA[Hello, world!]]></content>’ ); echo (string) $content; // or with parent element: $foo = simplexml_load_string( ‘<foo><content><![CDATA[Hello, world!]]></content></foo>’ ); echo (string) $foo->content; You might … Read more

What does in XML mean?

CDATA stands for Character Data and it means that the data in between these strings includes data that could be interpreted as XML markup, but should not be. The key differences between CDATA and comments are: As Richard points out, CDATA is still part of the document, while a comment is not. In CDATA you … Read more