Variable with CDATA

Hello

I try to use a variable with <![CDATA> string. After replace i’ve got carriage return and space after the value.

Example :
Variable name : ATS_ApiTDCvtkCredential
Variable type : text
Variable value : <![CDATA[client_id=cvtk&client_secret=26i"w>a$.10vF0),~~xy&grant_type=client_credentials]]>

Web.config extract before replace :

<setting name="ApiTDCvtkCredential" serializeAs="String">
    <value>#{ATS_ApiTDCvtkCredential}</value>
</setting>

Web.config extract after replace :

      <setting name="ApiTDCvtkCredential" serializeAs="String">
        <value><![CDATA[client_id=cvtk&client_secret=26i"w>a$.10vF0),~~xy&grant_type=client_credentials]]>
        </value>
      </setting>

Thanks for your help

Christophe

Hi Christophe,

Thanks for getting in touch. I’ve set up this scenario but I can’t reproduce this behavior. Could it perhaps be the config transforms causing this?

Also, could you check the variable, just to make sure there are no stray characters on the end? You can click on open in editor to get a better view. There should only be a number 1 on the left.

From my testing, the space and carriage return are ignored when the XML is parsed, only the data between the CDATA delimiter is returned. Is this causing a problem.

Rob

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.