1

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.

James A Mohler
  • 11,060
  • 15
  • 46
  • 72
RHPT
  • 2,560
  • 5
  • 31
  • 43

1 Answers1

3

Just set it. Don't use structInsert. Example:

mydoc.employee.name.XmlAttributes["i:nil"] = true;

Sean Coyne
  • 3,864
  • 21
  • 24