May 2008

You are browsing the archive for May 2008.

IndentXml CF UDF

I had a need to fix indentation of some XML today, and a quick Googling didn't turn up much help. So I wrote a little UDF that will take an XML string and return it with all the tags nicely indented:
<cffunction name="indentXml" output="false" returntype="string">
<cfargument name="xml" type="string" required="true" />
<cfargument name="indent" type="string" [...]