TipcMsgAppendXml


Name

TipcMsgAppendXml — append an XML field to a message

Synopsis

T_BOOL TipcMsgAppendXml(msg, xml_data) 
T_IPC_MSG msg; 
T_XML xml_data; 

Arguments

msg — message to which to append the field

xml_data — data for new message field

Return Values

TRUE if the field was successfully appended to the message, FALSE otherwise.

Diagnostics

If TipcMsgAppendXml fails, it returns FALSE and sets the global SmartSockets error number to one of:

Description

TipcMsgAppendXml appends an XML object field to the end of a message’s data. TipcMsgAppendXml makes a copy of the XML object.

Caution

None

See Also

TipcMsgNextXml

Examples

This example creates a message and appends an XML field:

T_IPC_MT mt; 
T_IPC_MSG msg; 
T_XML xml; 
 
T_XML xml_val; 
#define USER_MT_XML_TEST 100 
mt = TipcMtCreate("xml_test", USER_MT_XML_TEST, "xml"); 
if (mt == NULL) { 
return;  /* error */ 
} 
msg = TipcMsgCreate(mt); 
if (msg == NULL) { 
return;  /* error */ 
} 
xml = TutXmlCreate(“<data><data1><temp=\”hot\”/></data1></data>”); 
if (xml == NULL) { 
  return;  /* error */ 
} 
if (!TipcMsgAppendXml(msg, xml)) { 
return;  /* error */ 
} 

TIBCO SmartSockets™ Application Programming Interface
Software Release 6.8, July 2006
Copyright © TIBCO Software Inc. All rights reserved
www.tibco.com