Question Why would cause my queried XML data not show in my cfoutput? "shortDescription" shows in the xmldump, but not in the cfoutput with the rest of the data. Got me puzzled.
See page at http://dev.hotdeals.com/index.cfm See my code below: <cfhttp url=" http://merchandising.expediaaffiliate.com/campaign/?campaignId=5409&cid=311009" method="GET"> <cfscript> xmlfile = xmlparse(cfhttp.filecontent); //Parses the XML xmlsize = (xmlfile.HotelAvailabilityListResults.XmlAttributes.size); //HotelAvailabilityListResults is the parent tree xmlqry = QueryNew("Hotelid, name, city, promodescription, valueadds, displayroomrate, thumbNailUrl, shortDescription"); //Sets a query for output QueryAddRow(xmlqry,xmlsize); for(a=1;a LTE xmlsize;a=a+1) { //QuerySetCell(xmlqry,"hotelid",xmlfile.HotelAvailabilityListResults.hotel[a].xmlAttributes.hotelid,a); QuerySetCell(xmlqry,"hotelid",xmlfile.HotelAvailabilityListResults.hotel[a].hotelid.xmlText,a); //xmlfile.Tutorials.TutorialID[a].Title.xmlText gets the text of the title for the current tutorial (xmlText) QuerySetCell(xmlqry,"name",xmlfile.HotelAvailabilityListResults.hotel[a].name.xmlText,a); QuerySetCell(xmlqry,"thumbNailUrl",xmlfile.HotelAvailabilityListResults.hotel[a].thumbNailUrl.xmlText,a); QuerySetCell(xmlqry,"city",xmlfile.HotelAvailabilityListResults.hotel[a].city.xmlText,a); QuerySetCell(xmlqry,"shortDescription",xmlfile.HotelAvailabilityListResults.hotel[a].shortDescription.xmlText,a); QuerySetCell(xmlqry,"promodescription",xmlfile.HotelAvailabilityListResults.hotel[a].HotelProperty.promodescription.xmlText,a); QuerySetCell(xmlqry,"displayroomrate",xmlfile.HotelAvailabilityListResults.hotel[a].HotelProperty.rateinfo.displayroomrate.xmlText,a); if (StructKeyExists(xmlfile.HotelAvailabilityListResults.hotel[a].HotelProperty, "valueadds")) { QuerySetCell(xmlqry,"valueadds",xmlfile.HotelAvailabilityListResults.hotel[a].HotelProperty.valueadds.valueadd.xmlText,a); } //QuerySetCell(xmlqry,"displayroomrate",xmlfile.HotelAvailabilityListResults.hotel.HotelProperty[a].xmlAttributes.id,a); //xmlfile.Tutorials.TutorialID[a].xmlAttributes.id gets the value of the attribute in the tag } </cfscript> <link rel="stylesheet" href="css/design2011.css" type="text/css" media="all" /> <cfquery name="tutorials" dbtype="query"> SELECT * FROM xmlqry ORDER BY hotelid DESC </cfquery> <cfdump var = "#xmlqry#"> <cfoutput query="tutorials"> <div class="entry"> <div class="left"> <div class="img"><a href="##"><img src="#thumbNailUrl#" alt="" /></a></div> <a href="##" class="visit-button"><span>Visit the Site</span></a> </div> <div class="right"> <h2>#name#</h2> <p class="discount"><strong>Discount:</strong> <a href="">#promodescription#</a></p> <p class="meta"><strong>Property Description:</strong>#shortDescription#</p> </div> <div class="cl"> </div> </div> </cfoutput> -- Thanks for any help!!!
