1 Reply Latest reply: Jul 8, 2013 12:26 PM by Stephen J. RSS

    Velocity and CDATA

    neha

      Hi,

       

      I am using velocity template for generating a XML file. The xml file contains some query so I am using CDATA Tag. The query is generated dynamically. Following example I am using a static query

       

      My code goes

       

      #set( $query= "Select emp_Id from employee231" )

      <![CDATA[${query}]]>

       

       

      But when the template and data are merged using Velocity, the XML file generates as

       

      Select emp_Id from employee231

       

       

       

      Can anyone please help me. I want to generate my XML file as

       

      <![CDATA[Select emp_Id from employee231]]>

       

       

      ThankU in advance..

       

      -Neha..