# 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                                                                            |

![](/files/nXnSe2h3SVPUc9Ii5PdQ)

**Example**

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

Where,

*str* = Hello World

![](/files/9MTboUlnUWAY4uU6Ca3s)

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.

![](/files/dXslD59QdPFhen2B9MYr)


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://documentation.astera.com/astera-data-stack-v10/functions/string/addcdataenvelope.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
