This XQuery Module contains functions to handle ZIP archives. New ZIP archives can be created, existing archives can be updated, and the archive entries can be listed and extracted. This module may eventually replace the existing ZIP Module as soon as it is finalized and adopted by other XQuery implementations.
All functions in this module are assigned to the
http://basex.org/modules/zip2 namespace, which is statically bound to the
All errors are assigned to the
http://basex.org/errors namespace, which is statically bound to the
|Summary||Creates a new ZIP archive from the specified entries and contents.
|Examples||The following function creates a file |
zip:create( <file xmlns="http://expath.org/ns/zip" href="archive.zip"> <entry src="file.txt"/> </file>)
The following function creates a file
zip:zip-file( <file xmlns="http://expath.org/ns/zip" href="archive.zip"> <entry name="readme">thanks</entry> </file>)