|
IsWDDX
DescriptionDetermines
whether a value is a well-formed WDDX packet.
ReturnsTrue,
if the value is a well-formed WDDX packet; False, otherwise.
See alsoUsing
WDDX in the Developing ColdFusion Applications
HistoryColdFusion
MX: Changed behavior: if the value parameter is
not a WDDX packet, ColdFusion returns False. (In earlier releases,
ColdFusion threw an error.)
Parameters
Parameter
|
Description
|
value
|
A WDDX packet
|
UsageThis function
processes a WDDX packet with a validating XML parser, which uses the
WDDX Document Type Definition (DTD).
To prevent CFWDDX deserialization
errors, you can use this function to validate WDDX packets from
unknown sources.
Example<cfset packet="
<wddxPacket version='1.0'>
<header></header>
<data>
<struct>
<var name='ARRAY'>
<array length='3'>
<string>one</string>
<string>two</string>
</array>
</var>
<var name='NUMBER'>
<string>5</string>
</var>
<var name='STRING'>
<string>hello</string>
</var>
</struct>
</data>
</wddxPacket>"
>
<hr>
<xmp>
<cfoutput>#packet#
</xmp>
IsWDDX() returns #IsWDDX(packet)#<br>
</cfoutput>
|