admin:host-exists( $config as element(configuration), $host-name as xs:string ) as xs:boolean
This function determines whether or not the specified Host
exists. Returns true
if the Host exists, otherwise
false
is returned.
Parameters | |
---|---|
config | A configuration specification, typically as returned from one of the Admin module functions. |
host-name | The name of the host to check. |
xquery version "1.0-ml"; import module namespace admin = "http://marklogic.com/xdmp/admin" at "/MarkLogic/admin.xqy"; let $config := admin:get-configuration() return admin:host-exists($config, "hp6910-624v64b.marklogic.com") (: Returns true, if the specified host exists. :)
Stack Overflow: Get the most useful answers to questions from the MarkLogic community, or ask your own question.