Difference between revisions of "XML DECODE()"

From Lianjapedia
Jump to: navigation, search
 
(9 intermediate revisions by the same user not shown)
Line 6: Line 6:
  
 
==See Also==
 
==See Also==
[[MQCLOSE()]], [[MQCREATE()]], [[MQCURMSGS()]], [[MQOPEN()]],  [[MQSEND()]], [[MQRECEIVE()]], [[MQUNLINK()]], [[XML_ENCODE()]], [[XML_GATHER()]], [[XML_SCATTER()]]
+
[[MQCLOSE()]], [[MQCREATE()]], [[MQCURMSGS()]], [[MQOPEN()]],  [[MQSEND()]], [[MQRECEIVE()]], [[MQUNLINK()]], [[PRINT XML()]], [[XML]], [[XML_DECODE_FILE()]], [[XML_ENCODE()]], [[XML_GATHER()]], [[XML_SCATTER()]], [[XQUERY()]], [[XQUERY_ATTRIBUTES()]], [[XQUERY_CLOSE()]], [[XQUERY_COUNT()]], [[XQUERY_DECODE()]], [[XQUERY_FILE()]], [[XQUERY_FIND()]], [[XQUERY_NODE()]], [[XQUERY_OPEN()]], [[XQUERY_SELECT()]]
  
 
==Description==
 
==Description==
The XML_ENCODE() function is used to encode an object as a character string containing XML for use with the messaging functions to pass objects between processes.  The XML_DECODE() function returns the received XML character string, <expC1>, decoded back into an object.  The optional character expression <expC1> is the XML root tag name. The optional character expression <expC2> is the XML row tag name.   
+
The XML_ENCODE() function is used to encode an object as a character string containing XML for use with the messaging functions to pass objects between processes.  The XML_DECODE() function returns the received XML character string, <expC1>, decoded back into an object.  The optional character expression <expC2> is the XML root tag name. The optional character expression <expC3> is the XML row tag name.   
  
 
==Example==
 
==Example==
Line 31: Line 31:
 
[[Category:Functions]]
 
[[Category:Functions]]
 
[[Category:XML]]
 
[[Category:XML]]
[[Category:Messaging]]
+
[[Category:Messaging Functions]]
 
[[Category:Lianja VFP Extensions]]
 
[[Category:Lianja VFP Extensions]]
 
[[Category:VFP Function Extensions]]
 
[[Category:VFP Function Extensions]]

Latest revision as of 08:28, 29 February 2016

Purpose

Return a character string containing XML decoded as an object

Syntax

XML_DECODE(<expC1> [, <expC2>, <expC3>])

See Also

MQCLOSE(), MQCREATE(), MQCURMSGS(), MQOPEN(), MQSEND(), MQRECEIVE(), MQUNLINK(), PRINT XML(), XML, XML_DECODE_FILE(), XML_ENCODE(), XML_GATHER(), XML_SCATTER(), XQUERY(), XQUERY_ATTRIBUTES(), XQUERY_CLOSE(), XQUERY_COUNT(), XQUERY_DECODE(), XQUERY_FILE(), XQUERY_FIND(), XQUERY_NODE(), XQUERY_OPEN(), XQUERY_SELECT()

Description

The XML_ENCODE() function is used to encode an object as a character string containing XML for use with the messaging functions to pass objects between processes. The XML_DECODE() function returns the received XML character string, <expC1>, decoded back into an object. The optional character expression <expC2> is the XML root tag name. The optional character expression <expC3> 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