QuerySetCell(xmlqry,"promodescription",xmlfile.HotelAvailabilityListResults.hotel[a].HotelProperty.promodescription.xmlText,a);

try .xmlCDATA instaed of .xmlText

On Thu, Jan 27, 2011 at 9:47 PM, Michael Brown <[email protected]>wrote:

> 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[&lt;p&gt;&lt;strong&gt;Location.&lt;/strong&gt; &lt;br /&gt;This 
>> condo property is located in Celebration. Old Town is an area attraction. 
>> Another nearby attraction is Wide World of Sports. 
>> &lt;/p&gt;&lt;p&gt;&lt;strong&gt;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">&nbsp;</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
>
> Marketing Solutions with vision!
> http://www.singleconcepts.com
>
>
>


-- 
Steve Ross
web application & interface developer
http://blog.stevensross.com
[mobile] (912) 344-8113
[ AIM / Yahoo! : zeriumsteven ] [googleTalk : nowhiding ]

Reply via email to