xdmp.subbinary( source as binary(), starting-location as Number, [length as Number] ) as binary()
Returns a binary node made up of a subset of the given binary node.
Usage is exactly like fn:substring except that it applies to a binary node rather than a string.
var node = new NodeBuilder(); var bin = node.addBinary( "DEADBEEF" ).toNode(); xdmp.describe(fn.data(xdmp.subbinary(bin, 3, 2))); => xs:hexBinary("BEEF")
Stack Overflow: Get the most useful answers to questions from the MarkLogic community, or ask your own question.