renderData xmlRootAttribute patch

I needed a way to add some attributes to the root element with
renderData type="xml", so i came up with this patch. I hope it is OK
to just include the patch here, and I hope it is "up to snuff" to get
included in the next revision. :slight_smile:

Basically, it adds a new optional attribute (xmlRootAttributes) to the
renderData function that allows you to pass a struct of simple name/
value pairs. This will be included in the root element, formatted
correctly. For example:

Input:
<cfscript>
xmlRootAttArgs= structNew();
xmlRootAttArgs.customeratt1 = "a";
xmlRootAttArgs.customeratt2 = "b";
Event.renderData(type="xml",data=arData,xmlRootName="items",xmlUseCDATA=false,xmlRootAttributes=xmlRootAttArgs);
</cfscript>

Output:
<items customatt1="a" customatt2="b">
<item>...</item>...

On version 3M6:

### Eclipse Workspace Patch 1.0
#P Amp
Index: www/coldbox/system/plugins/Utilities.cfc

Great stuff Ken!!

Maybe you can give github a shot and do a fork and pull request on this?

Luis F. Majano
President
Ortus Solutions, Corp

ColdBox Platform: http://www.coldbox.org
Linked In: http://www.linkedin.com/pub/3/731/483
Blog: http://www.luismajano.com
IECFUG Manager: http://www.iecfug.com

Sounds like fun!

Ken, is there a way you can send me these files, so I can add it to the release?

Luis F. Majano
President
Ortus Solutions, Corp

ColdBox Platform: http://www.coldbox.org
Linked In: http://www.linkedin.com/pub/3/731/483
Blog: http://www.luismajano.com
IECFUG Manager: http://www.iecfug.com

Hello? Ken?

Luis F. Majano
President
Ortus Solutions, Corp

ColdBox Platform: http://www.coldbox.org
Linked In: http://www.linkedin.com/pub/3/731/483
Blog: http://www.luismajano.com
IECFUG Manager: http://www.iecfug.com