Hi Erik, I think it is supposed to return a document-node, and if it doesn’t perhaps the body is empty. You can find some usage notes here:
http://docs.marklogic.com/xdmp:get-request-body And yes, normally `document { $body }` should do the trick, but if $body is empty, you end up with an empty doc node.. Cheers, Geert From: <[email protected]<mailto:[email protected]>> on behalf of Erik Zander <[email protected]<mailto:[email protected]>> Reply-To: MarkLogic Developer Discussion <[email protected]<mailto:[email protected]>> Date: Wednesday, February 15, 2017 at 9:54 AM To: MarkLogic Developer Discussion <[email protected]<mailto:[email protected]>> Subject: [MarkLogic Dev General] xdmp:get-request-body(); as document-node Hi All, I hope you can help me here as my memory won’t cooperate :) I’m using declare variable $xmlBody := xdmp:get-request-body(); <= input here is a post with content-type application/xml and later in the code I check that it’s a document node but that check fails How can I convert the $xmlBody into a document node? Document{$xmlbody} didn’t do the trick. Regards Erik
_______________________________________________ General mailing list [email protected] Manage your subscription at: http://developer.marklogic.com/mailman/listinfo/general
