Changes

Jump to navigation Jump to search
60 bytes removed ,  18:30, 1 December 2023
m
Text replacement - "</syntaxhighlight>" to "</pre>"
<syntaxhighlight lang="xquery">
fetch:doc("http://en.wikipedia.org", map { 'stripws': true() })
</syntaxhighlightpre>
* Return a web page as XML, preserve namespaces:
<syntaxhighlight lang="xquery">
}
)
</syntaxhighlightpre>
|}
<syntaxhighlight lang="xquery">
fetch:binary-doc(file:read-binary('doc.xml'))
</syntaxhighlightpre>
* Encodes a string as CP1252 and parses it as XML. The input and the string {{Code|touché}} will be correctly decoded because of the XML declaration:
<syntaxhighlight lang="xquery">
"CP1252"
))
</syntaxhighlightpre>
* Encodes a string as UTF-16 and parses it as XML. The document will be correctly decoded, as the first bytes of the data indicate that the input must be UTF-16:
<syntaxhighlight lang="xquery">
fetch:binary-doc(convert:string-to-base64("<xml/>", "UTF16"))
</syntaxhighlightpre>
|- valign="top"
| '''Errors'''
Bureaucrats, editor, reviewer, Administrators
13,554

edits

Navigation menu