MarkLogic 9 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)
Powered by MarkLogic Server | Terms of Use | Privacy Policy