Changes

Jump to navigation Jump to search
24 bytes removed ,  18:30, 1 December 2023
m
Text replacement - "<syntaxhighlight lang="xquery">" to "<pre lang='xquery'>"
The XQuery expression below serves as an example on how large files can be downloaded and written to a file with constant memory consumption:
<syntaxhighlight pre lang="'xquery"'>
file:write-binary('output.data', fetch:binary('http://files.basex.org/xml/xmark111mb.zip'))
</syntaxhighlight>
| '''Example'''
|In the following example, a file is deleted before its content is returned. To avoid a “file not found” error when serializing the result, the content must be cached:
<syntaxhighlight pre lang="'xquery"'>
let $file := 'data.txt'
let $text := lazy:cache(file:read-text($file))
Bureaucrats, editor, reviewer, Administrators
13,550

edits

Navigation menu