Hi Mr.SALVADOR,
I got the solution what i was looking for:
let $dbpath := '/test/'
let $files := fn:uri-collection($dbpath)
let $count := fn:count($files)
let $zip := archive:create(
$files ! element archive:entry { . },
$files ! bin:encode-string(fn:serialize((fn:doc(.))))
)
return file:write-binary('D:\2017\doctest\xml.zip', $zip)
Thanks and Regards
Dharmendra Kumar Singh
On Friday, 7 July 2017 12:09 AM, Xavier-Laurent SALVADOR <xavierlaurent.salvador@gmail.com> wrote:
Hello,
this is a mistake our students do many often:
--------
1. (:1- One file with all entries:)
2. file:write('D:\myBase.xml', <bdd>{for $x in /bdd return $x}</bdd>)
-------
1. (:Many files with one entry each:)
2. for $x at $count in //entry return file:write('D:\'||$count||'.xml', $x)
-------
Br