XML DECODE()

From Recital Documentation Wiki
Revision as of 11:10, 27 November 2009 by Yvonnemilne (Talk | contribs)

Jump to: navigation, search

Template:YLM to do

Purpose

Return a character string containing XML decoded 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 character string containing XML, <expC1>, decoded as an object. The optional character expression <expC1> is the XML root tag name. The optional character expression <expC2> is the XML row tag name.


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 an object/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