Add XML Byte Sequence

Convenience Function

Declaration

tibrv_status tibrvMsg_AddXml(
   tibrvMsg       message,
   const char*    fieldName,
   const void*    value,
   tibrv_u32      size);
tibrv_status tibrvMsg_AddXmlEx(
   tibrvMsg       message,
   const char*    fieldName,
   const void*    value,
   tibrv_u32      size,
   tibrv_u16      fieldId);

Purpose

Add a field containing XML data.

Remarks

XML data is a byte sequence. Adding a field of type TIBRVMSG_XML compresses the bytes. Extracting data from the field uncompresses it to obtain the original byte sequence.

Parameter

Description

message

Add the new field to this message.

fieldName

Create the new field with this name.

value

Add a new field that contains the XML data in this buffer.

The function copies the data into the new message field.

size

When adding XML data, the program supplies the size (in bytes) of the data in this parameter.

fieldId

Create the new field with this identifier. Zero is a special value that signifies no field identifier. All non-zero field identifiers must be unique within each message.

It is illegal to add a field that has both a NULL field name, and a non-zero field identifier.