charlie the problem is that the CDATA is already in > etc he needs to convert it back and unfortunately there is no "unhtmleditformat" in CF...
On Fri, Jan 28, 2011 at 10:46 AM, Charlie Arehart <[email protected]>wrote: > Michael, did you try what I suggested? > > > > /charlie > > > > *From:* [email protected] [mailto:[email protected]] *On Behalf Of *Charlie > Arehart > *Sent:* Thursday, January 27, 2011 11:02 PM > *To:* [email protected] > *Subject:* RE: [ACFUG Discuss] XML data showing in dump but not in > cfoutput > > > > Depends on what you mean you want to show. If you want to see “on-screen” a > representation of the XML (for display), use htmleditformat() around > whatever variable you want to show. This is a really old function, used > originally for display of HTML or CFML. All it does is convert tag brackets > into > and <, among other things. > > But just beware that that’s fine for displaying the XML in the browser: if > you are outputting it to be read by some process that wants to read the real > XML, then you do NOT want to use this. > > Hope that helps. > > /charlie > > > > *From:* [email protected] [mailto:[email protected]] *On Behalf Of *Michael > Brown > *Sent:* Thursday, January 27, 2011 9:48 PM > *To:* [email protected] > *Subject:* Re: [ACFUG Discuss] XML data showing in dump but not in > cfoutput > > > > Steve, > > > > I saw that, this is the way it's coming from the source. Is there any > formatting tricks that can get it to show in the cfoutput? > > > > Thanks for your response! > > On Thu, Jan 27, 2011 at 9:44 PM, Steve Ross <[email protected]> wrote: > > because it is spitting out: > > > > <![CDATA[<p><strong>Location.</strong> <br />This > condo property is located in Celebration. Old Town is an area attraction. > Another nearby attraction is Wide World of Sports. > </p><p><strong>Features.]] > > > > which html is ignoring... (view source the code is there) > > > > > > you need the data within the CDATA (also be aware that there is html in there > that probably should be dealt with. > > > > > > -Steve > > > > On Thu, Jan 27, 2011 at 9:30 PM, Michael Brown <[email protected]> > wrote: > > 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!!! > > > > > > > -- > Steve Ross > web application & interface developer > http://blog.stevensross.com > [mobile] (912) 344-8113 > [ AIM / Yahoo! : zeriumsteven ] [googleTalk : nowhiding ] > > > > > -- > Michael Brown > > 770-605-5240 > > [image: http://singleconcepts.com/images/newlogo2011_email.jpg] > > Marketing Solutions with vision! > > http://www.singleconcepts.com > > > > > > > ------------------------------------------------------------- > To unsubscribe from this list, manage your profile @ > http://www.acfug.org?fa=login.edituserform > > For more info, see http://www.acfug.org/mailinglists > Archive @ http://www.mail-archive.com/discussion%40acfug.org/ > List hosted by FusionLink <http://www.fusionlink.com> > ------------------------------------------------------------- > > ------------------------------------------------------------- > To unsubscribe from this list, manage your profile @ > http://www.acfug.org?fa=login.edituserform > > For more info, see http://www.acfug.org/mailinglists > Archive @ http://www.mail-archive.com/discussion%40acfug.org/ > List hosted by FusionLink <http://www.fusionlink.com> > ------------------------------------------------------------- -- Steve Ross web application & interface developer http://blog.stevensross.com [mobile] (912) 344-8113 [ AIM / Yahoo! : zeriumsteven ] [googleTalk : nowhiding ]
