Created
December 17, 2024 23:41
-
-
Save trycf/0c6ea85db9212876bfb124b8595bb8f3 to your computer and use it in GitHub Desktop.
TryCF Gist
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<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