• Create BookmarkCreate Bookmark
  • Create Note or TagCreate Note or Tag
  • PrintPrint

Name

IsWDDX

Synopsis

                  IsWDDX(value)

Uses a validating XML parser with the WDDX DTD to determine whether a specified value is a well-formed WDDX packet. Returns true if the specified value is a well-formed WDDX packet or false if it isn’t. The following example shows how to use the IsWDDX( ) function to detect if a value is a well-formed WDDX packet:

<!--- Serialize a string into a WDDX packet --->
<cfwddx action="CFML2WDDX" input="I am a string!" output="MyWDDXPacket1">
   
<cfset MyWDDXPacket2 = "I am a string too!">        
   
<cfoutput>#HTMLEditFormat(MyWDDXPacket1)#<br></cfoutput><p>
   
<!--- Check if MyWDDXPacket1 contains a well-formed WDDX packet --->
<cfif IsWDDX(MyWDDXPacket1)>
  <b>Is</b> a well-formed WDDX packet!
<cfelse>
  <b>Is not</b> a well-formed WDDX packet!
</cfif>        
   
<cfoutput>#HTMLEditFormat(MyWDDXPacket2)#<br></cfoutput><p>
   
<!--- Check if MyWDDXPacket2 contains a well-formed WDDX packet --->
<cfif IsWDDX(MyWDDXPacket2)>
  <b>Is</b> a well-formed WDDX packet!
<cfelse>
  <b>Is not</b> a well-formed WDDX packet!
</cfif>

PREVIEW

                                                                          

Not a subscriber?

Start A Free Trial


  
  • Creative Edge
  • Create BookmarkCreate Bookmark
  • Create Note or TagCreate Note or Tag
  • PrintPrint