NodeBuilder.addBinary( hex as String|xs.hexBinary ) as This NodeBuilder object
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. |
Binary nodes may only be added to the root of the tree.
const builder = new NodeBuilder(); builder.addBinary('616263'); // 'abc' as hex builder.toNode(); // Returns a binary node containing 3 bytes (0x616263)