4 Replies Latest reply on Mar 5, 2007 11:32 AM by insuractive

    isDefined() xml array --> cfparam tag

    romeogq Level 1
      OK, as many of us know you cannot use the isDefined() function on an array. Fine. So one of the agreed upon work arounds which I have seen may use is the cfparam tag as so:

      <cfloop index="count" from="1" to="10">
      <cfparam name="#house[count]#.rooms" default="" />
      #house[count]#.rooms
      </cfloop>

      That's cool. Now, what is the deal with cfparam tag and it's use with xml?? Both of the following give me the error "An error occured while Parsing an XML document. Content is not allowed in prolog." What is that!??

      First,
      <cfloop index="count" from="1" to="10">
      <cfparam name="#house[count]#.rooms.XmlText" default="" type="xml" />
      #house[count]#.rooms.XmlText
      </cfloop>

      Second,
      <cfloop index="count" from="1" to="10">
      <cfparam name="#house[count]#.rooms.XmlText" default="<rooms></rooms>" type="xml" />
      #house[count]#.rooms.XmlText
      </cfloop>