Skip to content

Instantly share code, notes, and snippets.

@ableasdale
Last active December 14, 2015 08:39
Show Gist options
  • Save ableasdale/5059231 to your computer and use it in GitHub Desktop.
Save ableasdale/5059231 to your computer and use it in GitHub Desktop.
Lists out all the groups and their associated hosts and application servers
xquery version "1.0-ml";
element groups {
for $grp in xdmp:groups()
return
(element group {attribute id {$grp}, element group-name {xdmp:group-name($grp)},
for $host in xdmp:group-hosts($grp)
return element host {attribute id {$host}, xdmp:host-name($host)},
for $server in xdmp:group-servers($grp)
return element server {attribute id {$server},xdmp:server-name($server)}
})
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment