Lucee Tag Reference
Tag <CFWDDX>
Serializes and de-serializes CFML data structures to the XML-based WDDX format.
Generates JavaScript statements to instantiate JavaScript objects equivalent to the contents of a
WDDX packet or some CFML data structures.
Body
This tag can't have a body.
Example
<cfwddx action="string" input="any" [output="string"] [toplevelvariable="string"] [usetimezoneinfo="boolean"] [validate="boolean"] [xmlconform="boolean"]>
This tag is also supported within cfscript
<cfscript> wddx action="string" input="any" [output="string"] [toplevelvariable="string"] [usetimezoneinfo="boolean"] [validate="boolean"] [xmlconform="boolean"]; </cfscript>
Attributes
The attributes for this tag are fixed. Except for the following attributes no other attributes are allowed.
Name | Type | Required | Description |
---|---|---|---|
action | string | Yes | Specifies the action taken by the cfwddx tag. |
input | any | Yes | The value to be processed. |
output | string | No | The name of the variable to hold the output of the operation. This attribute is required for action = 'WDDX2CFML'. For all other actions, if this attribute is not provided, the result of the WDDX processing is outputted in the HTML stream. |
toplevelvariable | string | No | The name of the top-level JavaScript object created by the deserialization process. The object created is an instance of the WddxRecordset object, explained in WddxRecordset Object. |
usetimezoneinfo | boolean | No | Indicates whether to output time-zone information when serializing CFML to WDDX. If time-zone information is taken into account, the hour-minute offset, as represented in the ISO8601 format, is calculated in the date-time output. If time-zone information is not taken into account, the local time is output. The default is Yes. |
validate | boolean | No | Applies if action = "wddx2cfml" or "wddx2js". - Yes: validates WDDX input with an XML parser using WDDX DTD. If parser processes input without error, packet is deserialized. Otherwise, an error is thrown. - No: no input validation |
xmlconform | boolean | No | if set to true generate valid xml, if set to false (default) the xml generated is compatible to other engines, but not valid xml (use for example single quotes for attribute values) |