[MarkLogic Dev General] Reading multipart response in X-query

Sudheer Yalaverthi sudheer.yalaverthi at gmail.com
Fri Aug 10 13:37:55 PDT 2012


Hi Team,


I am making an http post call from xquery and this call returns a
multipart/mixed response.

Can anybody help on how to read the multipart response in x-query.

Also when i tried to read the multipart in the response, it is in the
binary form.

let $response := xdmp:http-post($uri,$options)
let $val := fn:data($response[2])
return if ($val instance of xs:hexBinary) then
              'hexbindary type'
         else 'unkonwn'

I am really not sure why it is coming as a binary data. how do i convert it
to a string in the x-query.

thanks.

Regards,
Sudheer
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://developer.marklogic.com/pipermail/general/attachments/20120810/265e1885/attachment.html 


More information about the General mailing list