But the CDATA is not a node like most as it does not seem to be contained within it's own element.
createCDATASection() will return an object. In this case I cannot use this value as the value included into the second parameter of createElement().
Example of what I tried that doesn't work.
$xml = new DOMDocument( "1.0", "UTF-8" );
$base = $xml->createElement( 'history' );
$cdata_value = $xml->createCDATASection( 'John Smith' );
$xml->createElement( 'name', $cdata_value );
I am still at a loss of how I include the CDATA with an element like:
<name><![CDATA[john smith]]></name>