I want to use > and < in my xqy pages in Marklogic Server. But Marklogic converts > to > and < to < In Query Console also when I write > and run the query it prints the output as > but I want it to be > only and not >. How can I do this ?
2
votes
1 Answers
7
votes
In QConsole you can select the Text output format. If you do so with a query that only contains ">", than only a > will be output. If you select the XML output format, it will be escaped and wrapped in a result element by the QConsole eval function to make it well-formed.
If you are checking your xqy page using a common web browser, it could be escaping properly written results too, make sure to check page source.
Note also that Marklogic returns xquery output usually as text/xml. You can set the response content type to text/plain using xdmp:set-response-content-type("text/plain")
HTH