Outputting CDATA in XQuery

Posted by Hans on Stack Overflow See other posts from Stack Overflow or by Hans
Published on 2009-10-04T03:45:25Z Indexed on 2010/03/24 1:03 UTC
Read the original article Hit count: 402

Filed under:
|
|

How would I, using XQuery, transform

<author>John Smith</author>

to

<author><![CDATA[John Smith]]></author>

?

Also, how would I transform

<content>&lt;p&gt;&lt;em&gt;Hello&lt;/em&gt;&lt;/p&gt;</content>

to

<content><![CDATA[<p><em>Hello</em></p>]]></content>

?

If it matters, I am using XSLPalette.app.

© Stack Overflow or respective owner

Related posts about xquery

Related posts about cdata