Difference between revisions of "XML DECODE()"
From Recital Documentation Wiki
Yvonnemilne (Talk | contribs) |
Yvonnemilne (Talk | contribs) |
||
Line 2: | Line 2: | ||
==Purpose== | ==Purpose== | ||
− | + | Return a decoded character string containing XML as an object | |
Line 10: | Line 10: | ||
==See Also== | ==See Also== | ||
− | [[MQCLOSE()]], [[MQCREATE()]], [[MQCURMSGS()]], [[MQOPEN()]], [[MQSEND()]], [[MQRECEIVE()]], [[XML_ENCODE()]], [[XML_GATHER()]], [[XML_SCATTER()]] | + | [[:Category:Messaging|Messaging Functions]], [[MQCLOSE()]], [[MQCREATE()]], [[MQCURMSGS()]], [[MQOPEN()]], [[MQSEND()]], [[MQRECEIVE()]], [[XML_ENCODE()]], [[XML_GATHER()]], [[XML_SCATTER()]] |
==Description== | ==Description== | ||
− | The XML_DECODE() function returns | + | The XML_DECODE() function returns the decoded character string containing XML, <expC1>, as an object. |
==Example== | ==Example== | ||
<code lang="recital"> | <code lang="recital"> | ||
− | + | // Proccess the message queue | |
+ | do while .t. | ||
+ | // Check for new messages | ||
+ | do while (mqcurmsgs(m_mqdes) > 0) | ||
+ | // retrieve message | ||
+ | m_message = mqreceive(m_mqdes) | ||
+ | // decode the XML message into a dynamic array | ||
+ | m_objmessage = xml_decode(m_message) | ||
+ | // process the message | ||
+ | mq_process_message(m_objmessage, m_message) | ||
+ | enddo | ||
+ | sleep 1 | ||
+ | enddo | ||
</code> | </code> | ||
Line 29: | Line 41: | ||
[[Category:XML]] | [[Category:XML]] | ||
[[Category:XML Functions]] | [[Category:XML Functions]] | ||
+ | [[Category:Messaging]] | ||
+ | [[Category:Messaging Functions]] |
Revision as of 11:08, 27 November 2009
Purpose
Return a decoded character string containing XML as an object
Syntax
XML_DECODE(<expC1> [, <expC2>, <expC3>])
See Also
Messaging Functions, MQCLOSE(), MQCREATE(), MQCURMSGS(), MQOPEN(), MQSEND(), MQRECEIVE(), XML_ENCODE(), XML_GATHER(), XML_SCATTER()
Description
The XML_DECODE() function returns the decoded character string containing XML, <expC1>, as an object.
Example
// Proccess the message queue do while .t. // Check for new messages do while (mqcurmsgs(m_mqdes) > 0) // retrieve message m_message = mqreceive(m_mqdes) // decode the XML message into a dynamic array m_objmessage = xml_decode(m_message) // process the message mq_process_message(m_objmessage, m_message) enddo sleep 1 enddo
Products
Recital, Recital Server