Check the opt:literal instruction to display CDATA.
>>>>templates/test.tpl
<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
<opt:root>
<opt:literal type="cdata">Foo<![CDATA[Bar]]>{$joe}<![CDATA[Goo]]>Hoo</opt:literal>
</opt:root>
>>>>expected.txt
OUTPUT
>>>>result.txt
<![CDATA[FooBarJoeGooHoo]]>
>>>>data.php
$view->joe = 'Joe';