deserializeXML

Deserializes a string in XML format to a ColdFusion object.

deserializeXML(string [,useCustomSerializer]); → returns any

This function requires Adobe ColdFusion 11 and up.  Not supported on Lucee, etc.

Argument Reference

string string
Required

A string that needs to be deserialized.

useCustomSerializer boolean
Required
Default: true

This identifies whether or not to use the custom serializer. The default value is true. The custom serializer will be always used for XML deserialization. If false, the XML/JSON deserialization will be done using the default ColdFusion behavior. If any other type is passed with useCustomSerializer as false, then TypeNotSupportedException will be thrown.

Links more information about deserializeXML

Examples
Sample code invoking the deserializeXML function

<cfset value = deserializeXML(toString(xmlDoc.root.XMLChildren[i].XMLChildren[1]), true)> 

Signup for cfbreak to stay updated on the latest news from the ColdFusion / CFML community. One email, every friday.

Fork me on GitHub