1 Reply Latest reply on Jun 27, 2006 12:31 PM by BKBK

    Difficulty parsing XML document into query object

      Background: Using CFMX 6.1 to take an XML file exported from MS-Access and parse it into a query object.
      Problem: Of the 6 columns defined in the target query, one of the columns is only populated in the XML file a very low percentage of the time. When trying to populate the column for a record that has no volume I was getting the following error:

      Element KEY6.XMLTEXT is undefined in a Java object of type class coldfusion.xml.XmlNodeMap referenced as...

      To get around this I made this code change:

      <cfset temp = QuerySetCell(mcquery, "CuKey6",
      #mydoc.root.dataroot.qTop1000 .Key6.XmlText#, #i#)>

      <cfif StructKeyExists(mydoc.root.dataroot.qTop1000
      <cfset temp = QuerySetCell(mcquery, "CuKey6",
      #mydoc.root.dataroot.qTop1000 .Key6.XmlText#, #i#)>

      The new code gets around the error, but when the template is executed, columns that DO have values
      show up as "[empty string]".

      I am trying to figure out why when the record has a actual value it is now overwritten instead of populated normally?