MarkLogic 9 Product Documentation
pkg:get-package

pkg:get-package(
   $pkgname as xs:string,
   [$mimetype as xs:string?]
) as xs:string?

Summary

[DEPRECATED: use cma:generate-config and cma:apply-config instead.]

Returns the contents of the named package. By default, the package is returned in ZIP format.

Parameters
pkgname The name of the package to return.
mimetype The format in which to return the package. By default the package is returned in ZIP format. Specify application/xml to return the package in XML format or application/json to return the package in JSON format.

Usage Notes

The XML and JSON formats only return the configuration of application servers and databases in the package. Packages may also contain modules, so the only reliable way to transport packages between clusters is with the ZIP format.

Example


xquery version "1.0-ml"; 
 
import module namespace pkg = "http://marklogic.com/manage/package" 
      at "/MarkLogic/manage/package/package.xqy";

pkg:get-package("mypackage", "application/xml")

(: Returns the contents of the 'mypackage' package in XML format. :)
    
Powered by MarkLogic Server | Terms of Use | Privacy Policy