If you really want CDATA escaping for certain elements, you can use the 
output options to control this.

See https://docs.marklogic.com/guide/app-dev/appserver-control#id_86940 
for how to set output options at the appserver level and 
https://docs.marklogic.com/guide/xquery/langoverview#id_71572 for how to 
do so on a query by query level using prolog options.

In your case, putting this at the top of your query should do it:

declare option xdmp:output "cdata-section-elements=text";

Note, however, that testing this via QConsole won't be effective, 
because of the way QConsole works, its own serialization options will 
win out.

//Mary

On 05/05/2015 04:42 AM, Florent Georges wrote:
>    Hi,
>
>    First I guess your question has nothing to do with the email you quote.
>
>    You need to ask the question why you need CDATA.  You most likely do
> not.  Why is the following result not good for you?
>
>      <text>&lt;p&gt;Sample content of a P element.&lt;/p&gt;</text>
>
>    Regards,
>
_______________________________________________
General mailing list
[email protected]
Manage your subscription at: 
http://developer.marklogic.com/mailman/listinfo/general

Reply via email to