Loading TOC...

MarkLogic 12 EA 1 Product Documentation
xdmp.urlEncode

xdmp.urlEncode(
   plaintext as String,
   [noSpacePlus as Boolean?]
) as String

Summary

Converts plaintext into URL-encoded string. To decode the string, use xdmp.urlDecode.

There is also a W3C function that does a slightly different url encoding: fn.encodeForUri.

Parameters
plaintext Plaintext to be encoded.
noSpacePlus True to encode space as "%20" instead of "+".

Example

xdmp.urlEncode("Why not?")
=> "Why+not%3f"

Stack Overflow iconStack Overflow: Get the most useful answers to questions from the MarkLogic community, or ask your own question.