Hi Gert,
Thanks for confirming I wasn't way of :)
The body isn't empty but it doesn't matter as the error seams to be elsewhere
anyway.
Regards Erik
Från: general-boun...@developer.marklogic.com
[mailto:general-boun...@developer.marklogic.com] För Geert Josten
Skickat: den 15 februari 2017 10:07
Till: MarkLogic Developer Discussion <general@developer.marklogic.com>
Ämne: Re: [MarkLogic Dev General] xdmp:get-request-body(); as document-node
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:
<general-boun...@developer.marklogic.com<mailto:general-boun...@developer.marklogic.com>>
on behalf of Erik Zander
<erik.zan...@studentlitteratur.se<mailto:erik.zan...@studentlitteratur.se>>
Reply-To: MarkLogic Developer Discussion
<general@developer.marklogic.com<mailto:general@developer.marklogic.com>>
Date: Wednesday, February 15, 2017 at 9:54 AM
To: MarkLogic Developer Discussion
<general@developer.marklogic.com<mailto:general@developer.marklogic.com>>
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
General@developer.marklogic.com
Manage your subscription at:
http://developer.marklogic.com/mailman/listinfo/general