Loading TOC...

MarkLogic Server 11.0 Product Documentation
NodeBuilder.addBinary

NodeBuilder.addBinary(
   hex as String|xs.hexBinary
) as This NodeBuilder object

Summary

Add a binary node to the node tree the builder is building.

Parameters
hex The contents of the binary node as a hex-encoded string or xs:hexBinary object.

Usage Notes

Binary nodes may only be added to the root of the tree.

Example

const builder = new NodeBuilder();
builder.addBinary('616263');    // 'abc' as hex
builder.toNode();

// Returns a binary node containing 3 bytes (0x616263)

Stack Overflow iconStack Overflow: Get the most useful answers to questions from the MarkLogic community, or ask your own question.