# AddCDATAEnvelope

| **Name**    | ***AddCDATAEnvelope***                                                                                                                   |
| ----------- | ---------------------------------------------------------------------------------------------------------------------------------------- |
| Syntax      | AddCDATAEnvelope (String str)                                                                                                            |
| Purpose     | To return the given string surrounded by CDATA envelope.                                                                                 |
| Description | Surrounds the specified string with CDATA XML envelope. Use this function to surround a string when mapping as CDATA to XML destination. |
| Return Type | String                                                                                                                                   |
| Parameters  | Str \[System.String] – String to surround with CDATA envelope                                                                            |

![](https://3083465318-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FsR50Wa7EwZGlmPSAMkkf%2Fuploads%2F4CK3wi4lEEUZRWIOixl7%2F0.png?alt=media)

**Example**

In this example, we are passing the required parameter to the function transformation object using a *Variables* object.

Where,

*str* = Hello World

![](https://3083465318-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FsR50Wa7EwZGlmPSAMkkf%2Fuploads%2FnV05HnVgKrCUJeovuL46%2F1.png?alt=media)

Right-click on the function transformation object and select *Preview Output.* You can see that Astera Data Stack has returned the specified string surrounded by CDATA envelope.

![](https://3083465318-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FsR50Wa7EwZGlmPSAMkkf%2Fuploads%2FOLLFP0yYEGKE3DogINuW%2F2.png?alt=media)
