Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save trycf/0c6ea85db9212876bfb124b8595bb8f3 to your computer and use it in GitHub Desktop.
Save trycf/0c6ea85db9212876bfb124b8595bb8f3 to your computer and use it in GitHub Desktop.
TryCF Gist
<cffunction name="makeXFDF">
<cfargument name="data" type="struct">
<cfoutput>
<cfxml variable="local.ret">
<xfdf xmlns="http://ns.adobe.com/xfdf/" xml:space="preserve">
<fields>
<cfloop list="#structKeyList(arguments.data)#" index="el">
<field name="#el#">
<value>#arguments.data[el]#</value>
</field>
</cfloop>
</fields>
</xfdf>
</cfxml>
</cfoutput>
<cfreturn local.ret />
</cffunction>
<cfoutput>#xmlFormat(makeXFDF({"aB":1,"cDc":2}))#</cfoutput>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment