Created
June 3, 2015 14:55
-
-
Save ableasdale/620fbe8b15a53fe21a4e to your computer and use it in GitHub Desktop.
Get several elements from a support dump regarding scheduled tasks
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
xquery version "1.0-ml"; | |
declare namespace db = "http://marklogic.com/xdmp/database"; | |
declare namespace gr = "http://marklogic.com/xdmp/group"; | |
import module namespace admin = "http://marklogic.com/xdmp/admin" at "/MarkLogic/admin.xqy"; | |
declare variable $SUPPORT-DUMP-FILEPATH as xs:string := 'E:\support-request-go\support-request-go.txt'; | |
declare variable $support as document-node()* := xdmp:document-get( | |
$SUPPORT-DUMP-FILEPATH, | |
<options xmlns="xdmp:document-get"> | |
<format>xml</format> | |
<repair>full</repair> | |
</options> | |
); | |
element items { | |
for $x in $support//gr:scheduled-tasks/gr:scheduled-task | |
return element item { ($x/gr:task-path, $x/gr:task-root, $x/gr:task-database, $x/gr:task-modules) } | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment