MarkLogic Server 11.0 Product Documentation
xdmp.subbinaryxdmp.subbinary(
source as binary(),
starting-location as Number,
[length as Number]
) 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
var node = new NodeBuilder();
var bin = node.addBinary( "DEADBEEF" ).toNode();
xdmp.describe(fn.data(xdmp.subbinary(bin, 3, 2)));
=> xs:hexBinary("BEEF")
Copyright © 2024 MarkLogic Corporation. MARKLOGIC is a
registered trademark of MarkLogic Corporation.