[MarkLogic Dev General] xdmp:http-head questions
Jakob Fix
jakob.fix at gmail.com
Wed Jun 24 01:12:53 PDT 2009
Hi,
I have two questions related to xdmp:http-head.
One, I need to check the availability of a number of URLs. xdmp:http-head
seems to be the appropriate method. Is it correct to assume that the best
way to handle timeouts and 404s is to use try {} catch blocks and look at
the error message's code value?
Two, the documentation is not really clear about the possible responses.
let $head := xdmp:http-head($aUrl)
let $httpCode :=$head[1]/response/code (: => returns an empty sequence :)
In cq, I can see the XML of the $head, but trying to access elements inside
always returns an empty sequence. How can I access the contents of the XML
response?
thanks,
Jakob.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://xqzone.marklogic.com/pipermail/general/attachments/20090624/7c327a27/attachment-0001.html
More information about the General
mailing list