XMLNSC: base64 support

The XMLNSC parser can produce binary data in base64-encoded format.

If Validation is set to Content and Value, and Build tree using schema types is enabled, the XMLSNC parser automatically decodes base64 data and creates a BLOB value in the message tree. When producing a message tree, the XMLNSC parser will 'base64-encode' a BLOB if the field type includes the constant XMLNSC.base64Binary.

ESQL code example to output base64 data

DECLARE Base64Data BLOB '0102030405060708090A0B0C0D0E0F';
-- Add in the base64Binary field type
DECLARE base64FieldType INTEGER XMLNSC.Field + XMLNSC.base64Binary;
CREATE LASTCHILD OF OutputRoot DOMAIN 'XMLNSC' NAME 'XMLNSC';
CREATE LASTCHILD OF OutputRoot.XMLNSC TYPE base64FieldType NAME 'myBinaryData' VALUE Base64Data;
Result : <myBinaryData>AQIDBAUGBwgJCgsMDQ4P</myBinaryData>

Note that this example does not depend on validation. The XMLNSC parser can produce base64 binary data even if Validation is set to None.