TipcMsgNextXml get the next XML string from a message
msg
message from which to get the field
xml_return
storage for XML value from field
TRUE
if the field was successfully retried from the message, FALSE
otherwise.
If TipcMsgNextXml fails, it returns FALSE
and sets the global SmartSockets error number to:
TipcMsgNextXml retrieves the value of the current field of a message, which must be an XML field. If TipcMsgNextXml succeeds, it advances the current field to the next field in the message.
If TipcmsgNextXml returns FALSE
, it does not store a value in xml_return
.
Do not modify the value stored in xml_return
. It points directly into an internal data structure.
TipcMsgAppendXml; see the TIBCO SmartSockets Utilities for information on TutXmlCreate.
T_IPC_MT mt; T_IPC_MSG msg; T_XML xml, xml_val; 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 */
} if (!TipcMsgSetCurrent(msg, 0)) {return
; /* error */
} if (!TipcMsgNextXml(msg, &xml_val)) {return
; /* error */
}
TIBCO SmartSockets™ Application Programming Interface Software Release 6.8, July 2006 Copyright © TIBCO Software Inc. All rights reserved www.tibco.com |