Last Updated: 2022-12-01
My XML validation test was failing for a component that wrapped every string in CDATA. The code was:
<?php $jobNode = $xml->addChild('title', '<![CDATA[actual title]]>');
The confusing part was that it displayed exactly like that in the browser.
I inspected it on the command line with CURL and sure enough the entities had auto-escaping fromthe XML library.
<title><![CDATA[Standard full-time bookkeeper]]></title>
I needed to use special tools to skip the auto-escaping for inspection:
When generating output that uses special characters, inspect in a command line program instead of in the browser, since the browser will transform some entities and fool you.