Difference between revisions of "XML ENCODE()"
Yvonne.milne (Talk | contribs) |
|||
(8 intermediate revisions by 2 users not shown) | |||
Line 1: | Line 1: | ||
==Purpose== | ==Purpose== | ||
Encode an object as a character string containing XML for use with the messaging functions to pass objects between processes | Encode an object as a character string containing XML for use with the messaging functions to pass objects between processes | ||
− | |||
==Syntax== | ==Syntax== | ||
XML_ENCODE(<object> [, <expC1>, <expC2>]) | XML_ENCODE(<object> [, <expC1>, <expC2>]) | ||
− | |||
==See Also== | ==See Also== | ||
− | + | [[MQCLOSE()]], [[MQCREATE()]], [[MQCURMSGS()]], [[MQOPEN()]], [[MQSEND()]], [[MQRECEIVE()]], [[MQUNLINK()]], [[PRINT XML()]], [[XML]], [[XML_DECODE()]], [[XML_DECODE_FILE()]], [[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== | ||
Line 15: | Line 12: | ||
The XML_DECODE() function is used to return the passed XML character string decoded back into an object. | The XML_DECODE() function is used to return the passed XML character string decoded back into an object. | ||
− | |||
==Example== | ==Example== | ||
Line 34: | Line 30: | ||
</code> | </code> | ||
− | |||
− | |||
− | |||
[[Category:Documentation]] | [[Category:Documentation]] | ||
[[Category:Functions]] | [[Category:Functions]] | ||
[[Category:XML]] | [[Category:XML]] | ||
− | |||
− | |||
[[Category:Messaging Functions]] | [[Category:Messaging Functions]] | ||
+ | [[Category:Lianja VFP Extensions]] | ||
+ | [[Category:VFP Function Extensions]] |
Latest revision as of 08:34, 29 February 2016
Contents
Purpose
Encode an object as a character string containing XML for use with the messaging functions to pass objects between processes
Syntax
XML_ENCODE(<object> [, <expC1>, <expC2>])
See Also
MQCLOSE(), MQCREATE(), MQCURMSGS(), MQOPEN(), MQSEND(), MQRECEIVE(), MQUNLINK(), PRINT XML(), XML, XML_DECODE(), XML_DECODE_FILE(), 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 and return a character string containing XML. The character string returned can be used with the messaging functions to pass objects between processes. The <object> is the object to be encoded. The optional character expression <expC1> is the XML root tag name. The optional character expression <expC2> is the XML row tag name.
The XML_DECODE() function is used to return the passed XML character string decoded back into an object.
Example
// Open up the queue for read/write access mqdes=mqcreate("/myqueue2", 2) if (mqdes < 0) messagebox(strerror()+",errno="+alltrim(str(error()))) return endif // send a message to the queue rc = mqsend(mqdes, xml_encode(tran_obj)) if (rc < 0) messagebox(strerror()+",errno="+alltrim(str(error()))) return endif mqclose(mqdes)