Q:

Special Characters in XML Attribute and ColdFusion

I need to create an XML Document with an element that requires the attribute i:nil=true. I've tried <cfset StructInsert(mydoc.employee.name.XmlAttributes, "i:nil", "true")>, but it returns the error The right hand side of the assignment is not of type XML Node. What I would like is this: <name i:nil="true"/>. 
The XML is used to call a .NET web service, and the DTD specifies that i:nil="true" is the way to indicate a field is should be null in the database.

A:

Just set it.  Don't use structInsert. Example:
mydoc.employee.name.XmlAttributes["i:nil"] = true;

