On Wed, 13 Feb 2013 06:33:13 -0800, <[email protected]> wrote:
> Hi, > > I have some documents in MarkLogic DB which has ampersand value stored > as & because we can't insert documents with just "&" character. > I have a requirement to retrieve a document and ftp the same. > But, when I retrieve the document, I want the "&" converted to "&" > because I don't want the encode value "&" in the file that is sent > to the ftp location. > Is there any function to convert this value back and forth? > > Thanks and Regards, > Karthik & is a serialization of an ampersand in an XML context. An actual '&' character is what is in the content, as you could verify by trying to search for "amp" (it won't match). If you want to serialize XML documents without using the entity escaping, the best you can do is use CDATA escaping instead, which can be done via the xdmp:output prolog option (or set generally on the appserver). declare xdmp:output "cdata-section-elements=example"; <example>&</example> ==> <example><![CDATA[&]]></example> XML does not allow unescaped ampersands. //Mary _______________________________________________ General mailing list [email protected] http://developer.marklogic.com/mailman/listinfo/general
