XDMP Function: String in XML

Is there any method defined in the marklogic function library with which we can convert (or try to convert) a string ( xs:string type) to xml ' document '? In my problem, I usually get xml sent via request parameters. Now I have to parse this xml as a document. So I have to take this as a string and parse it. What is the solution for this case?

+4
source share
3 answers

I think xdmp: unquote is what you are looking for.

+2
source

In XQuery 3.0, just use the standard XPath 3.0 parse-xml() function.

+1
source
 xdmp:eval("<ok/>") 

or

 xdmp:value("<ok/>") 

Both can be used for your problem.

Hello

+1
source

All Articles