Hi Ben,

A quick and dirty solution: 

  <jsp:scriptlet><![CDATA[
    String startCdata = "<![CDATA[";
    request.setAttribute("startCdata", startCdata);
    String endCdata = "]" + "]>";
    request.setAttribute("endCdata", endCdata);
  ]]>
  </jsp:scriptlet>

And use

<Content Type="paragraph">
${startCdata }
${content}
${endCdata }
</Content>

Ralf

-----Ursprüngliche Nachricht-----
Von: [email protected] [mailto:[EMAIL PROTECTED] 
Gesendet: Mittwoch, 7. März 2007 15:42
An: [email protected]
Betreff: [magnolia-user] Writing "<![CDATA[ ]]>" in a template

Hello.

I have a jsp template that I'm using to create an XML file. I have the
below CDATA tags wrapped around a node that contains HTML. I want the
CDATA tags to be written to the XML file, but instead they're processed
by the jsp and not displayed. Anyone know the correct way to print the
tags?

<Content Type="paragraph">
<![CDATA[
${content}
]]>
</Content>

 
Thanks in advance for any suggestions.

Ben

----------------------------------------------------------------
for list details see
http://www.magnolia.info/en/developer.html
----------------------------------------------------------------


----------------------------------------------------------------
for list details see
http://www.magnolia.info/en/developer.html
----------------------------------------------------------------

Reply via email to