title: Handling CDATA escaped XML in Freemarker
body: <p>I'm using Freemarker in my project to transform from one XML document to another.
  Due to crappy design or choice of canonical message format our supplier has chosen to embed some XML in CDATA escaped fields, probably as their chosen message standard does not handle all types of extensions. For whatever reason I now need to dig into this field and do some xpath queries.</p>
  
  <p>Say ie:</p>
  
  <pre><code>&lt;Invoice&gt;
    ..
    &lt;Note&gt;&lt;![CDATA[&lt;?xml version="1.0" encoding="utf-8"?&gt;&lt;a&gt;&lt;b&gt;Value&lt;/b&gt;&lt;/a&gt;]]&gt;&lt;/Note&gt;
  &lt;/Invoice&gt;
  </code></pre>
  
  <p>Anyone has an idea how to get value "a/b/text()" in this kind of scenario?</p>
  
  <p>I've thought about trying to clean the CDATA section manually and then parse it as XML, but my hopes are that Freemarker could do this for me.</p>