** Updated the output ** I am trying to add a <![CDATA[...]] to a value node that is being generated inside a loop. I am using XSLT & C#.net. I have tried a couple of things including Add CDATA to an xml file but none seems to be working so far. I even tried adding it literally but, as expected it did not work out. Can anyone please help me in this.
Here's how my node is being generated
<xsl:for-each select="$OLifE/">
<DataPoint>
<Name>Carrier.Requirements<xsl:if test="$NumberOfPayments > 1"><xsl:value-of select="position()"/></xsl:if></Name>
<Value>Here is the response text</Value>
</DataPoint>
My expected output is
<DataPoint>
<Name>Carrier.Requirements1</Name>
<Value><![CDATA[Here is the response text]]</Value>
</DataPoint>
<DataPoint>
<Name>Carrier.Requirements2</Name>
<Value><![CDATA[Here is the response text]]</Value>
</DataPoint>
<DataPoint>
<Name>Carrier.Requirements3</Name>
<Value><![CDATA[Here is the response text]]</Value>
</DataPoint>
Please let me know in case any further information is required.