xdmp:subbinary( $source as binary(), $starting-location as xs:double, [$length as xs:double] ) 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.
data(xdmp:subbinary(binary { xs:hexBinary("DEADBEEF") }, 3, 2)) => xs:hexBinary("BEEF")
Stack Overflow: Get the most useful answers to questions from the MarkLogic community, or ask your own question.