MarkLogic Server 11.0 Product Documentation
xdmp:subbinaryxdmp:subbinary(
$source as binary(),
$starting-location as xs:double,
[$length as xs:double]
) as binary()
Summary
Returns a binary node made up of a subset of the given binary node.
Parameters |
source |
A binary node whose subset will be returned
|
starting-location |
The new binary node starts at the byte position indicated by starting-location.
The first byte is at location 1.
|
length |
The length in bytes of the new binary node.
|
Usage Notes
Usage is exactly like fn:substring except that it applies to a binary
node rather than a string.
Example
data(xdmp:subbinary(binary { xs:hexBinary("DEADBEEF") }, 3, 2))
=> xs:hexBinary("BEEF")
Copyright © 2024 MarkLogic Corporation. MARKLOGIC is a
registered trademark of MarkLogic Corporation.