Wiki source for ExistGet
======eXist Command: get======
Gets resources on an eXist server
====Synopsis====
get [exist options] resource
get [exist options] resource output_file
get [exist options] resource resource [resource ...] output_directory
====Description====
Gets resources residing on an eXist server.
Resources are specified by the relative or absolute path. If a collection is specified then the collection description is returned as defined by the GET method in [[http://exist.sourceforge.net/devguide_rest.html]]
In the one argument case the resource is retrieved and output to the standard output.
In the two argument case the resource is retrieved and stored to the named file or port.
In the three or more argument case multiple resources are retrieved and stored in the output directory named by the basename of the resource.
====Exist Options====
The get command accepts all [[ExistCommonOptions eXist Common Options]]
====Example====
Assuming the prefix "e" is imported as the exist module, gets the resource "test.xml" and outputs it
%%
e:get test.xml
%%
Gets the eXist resource test.xml and stores as the local file mine.xml
%%
e:get test.xml mine.xml
%%
Gets a.xml, b.xml and c.xml and stores to the local directory out.
%%
e:get a.xml b.xml c.xml out
%%
To describe a collection and all its children use the collection name as the argument
%%
e:get /db/test
%%
Result
%%
<exist:result xmlns:exist="http://exist.sourceforge.net/NS/exist">
<exist:collection name="/db/test" created="2011-06-03T07:49:41.972-05:00" owner="guest" group="guest" permissions="rwur-ur-u">
<exist:resource name="a.xml" created="2011-06-03T07:49:41.972-05:00" last-modified="2011-06-03T07:49:41.972-05:00" owner="guest" group="guest" permissions="rwur-ur-u"/>
<exist:resource name="b.xml" created="2011-06-03T07:49:59.54-05:00" last-modified="2011-06-03T07:49:59.54-05:00" owner="guest" group="guest" permissions="rwur-ur-u"/>
</exist:collection>
</exist:result>$
%%
====Implementation====
get is implemented using the REST protocol using the GET method
See [[http://exist.sourceforge.net/devguide_rest.html]]
----
[[ModuleExist eXist Extension Module]]
Gets resources on an eXist server
====Synopsis====
get [exist options] resource
get [exist options] resource output_file
get [exist options] resource resource [resource ...] output_directory
====Description====
Gets resources residing on an eXist server.
Resources are specified by the relative or absolute path. If a collection is specified then the collection description is returned as defined by the GET method in [[http://exist.sourceforge.net/devguide_rest.html]]
In the one argument case the resource is retrieved and output to the standard output.
In the two argument case the resource is retrieved and stored to the named file or port.
In the three or more argument case multiple resources are retrieved and stored in the output directory named by the basename of the resource.
====Exist Options====
The get command accepts all [[ExistCommonOptions eXist Common Options]]
====Example====
Assuming the prefix "e" is imported as the exist module, gets the resource "test.xml" and outputs it
%%
e:get test.xml
%%
Gets the eXist resource test.xml and stores as the local file mine.xml
%%
e:get test.xml mine.xml
%%
Gets a.xml, b.xml and c.xml and stores to the local directory out.
%%
e:get a.xml b.xml c.xml out
%%
To describe a collection and all its children use the collection name as the argument
%%
e:get /db/test
%%
Result
%%
<exist:result xmlns:exist="http://exist.sourceforge.net/NS/exist">
<exist:collection name="/db/test" created="2011-06-03T07:49:41.972-05:00" owner="guest" group="guest" permissions="rwur-ur-u">
<exist:resource name="a.xml" created="2011-06-03T07:49:41.972-05:00" last-modified="2011-06-03T07:49:41.972-05:00" owner="guest" group="guest" permissions="rwur-ur-u"/>
<exist:resource name="b.xml" created="2011-06-03T07:49:59.54-05:00" last-modified="2011-06-03T07:49:59.54-05:00" owner="guest" group="guest" permissions="rwur-ur-u"/>
</exist:collection>
</exist:result>$
%%
====Implementation====
get is implemented using the REST protocol using the GET method
See [[http://exist.sourceforge.net/devguide_rest.html]]
----
[[ModuleExist eXist Extension Module]]