Update XML Byte Sequence

Convenience Function

Declaration

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

Purpose

Update a field containing an XML byte sequence.

Remarks

This convenience function locates a field (by name or identifier) and updates its data.

The type of the existing field (within the message) and the type of the updating value must match. The size can change.

Pointer data previously extracted from the field remain valid and unchanged until the message is destroyed; that is, even updating the field’s value does not invalidate pointer data. (See Pointer Snapshot.)

XML data is a byte sequence. Adding (or updating) 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

Update the specified field of this message.

fieldName

Update a field with this name.

value

Update the message field to this value.

The function copies the new value into the existing field.

size

The program supplies the size of the new data in this parameter.

fieldId

Update the field with this identifier. Zero is a special value that signifies no field identifier. It is illegal to add a field that has both a NULL field name, and a non-zero field identifier.

See Also

Field Names and Field Identifiers