Just to clarify Michael, I used cfset to hold it in a variable for my debugging purposes. The actual work is being done by replacelist(shortDescription, '<![CDATA[,]]>,<p><strong>,</strong> <br />,</p>','')
I used viewsource to see what is being returned and turns out that the text contained either lt gt and I replaced those with replacelist. Thats all. :-) <Ajas Mohammed /> http://ajashadi.blogspot.com We cannot become what we need to be, remaining what we are. No matter what, find a way. Because thats what winners do. You can't improve what you don't measure. Quality is never an accident; it is always the result of high intention, sincere effort, intelligent direction and skillful execution; it represents the wise choice of many alternatives. On Fri, Jan 28, 2011 at 2:21 PM, Michael Brown <[email protected]>wrote: > Steve is right. I have no control on the delivered data in the XML > > > On Fri, Jan 28, 2011 at 1:24 PM, Steve Ross <[email protected]> wrote: > >> I think the issue is he is consuming a webservice he has no control >> over... >> >> On Fri, Jan 28, 2011 at 1:22 PM, Teddy R. Payne <[email protected]>wrote: >> >>> All, >>> I apologize by coming in late to this, but I am trying to figure out >>> what the goal is in a way and I am sure others are as well. >>> >>> When you use <!CDATA[]]>, the goal is to make sure that an XML parser >>> does not evaluate anything in between the opening and closing of the >>> tag. That would mean < and > are interpreted as unicode. Now, as the >>> strings have already been escaped to > and <, is the goal to >>> prepare the string to be parsed through another service or is it to be >>> displayed? I apologize if that was an obvious question and I missed >>> the intent, but <!CDATA[]]> around already escaped strings seems >>> redundant. >>> >>> I typically use <!CDATA[]]> around the values of a XML node/parent to >>> ensure special characters are not evaluated, which is inside paired >>> xml tags. Of course, how do you want to massage the data is also >>> relevant here. You can build strings using the string functions or >>> create an xml object and use the XML functions. >>> >>> I am just curious if this is not a technology solution here, but a >>> design decision that is needed. >>> >>> >>> Teddy R. Payne, ACCFD >>> Google Talk - [email protected] >>> >>> >>> >>> >>> On Fri, Jan 28, 2011 at 1:02 PM, Ajas Mohammed <[email protected]> >>> wrote: >>> > Charlie, spot on. I was expecting the same result because those html >>> tags >>> > should show up fine. Guess what they are actually lt gt etc in variable >>> > thats why they show up as html tags when the result is being shown. >>> > >>> > So the fix is this. This works.I removed all gt lt etc. >>> > >>> > <cfset shortDescription1 = replacelist(shortDescription, >>> > '<![CDATA[,]]>,<p><strong>,</strong> <br >>> > />,</p>','')> >>> > >>> > <strong>Property Description:</strong>#shortDescription1# >>> > >>> > HTH >>> > >>> > <Ajas Mohammed /> >>> > http://ajashadi.blogspot.com >>> > We cannot become what we need to be, remaining what we are. >>> > No matter what, find a way. Because thats what winners do. >>> > You can't improve what you don't measure. >>> > Quality is never an accident; it is always the result of high >>> intention, >>> > sincere effort, intelligent direction and skillful execution; it >>> represents >>> > the wise choice of many alternatives. >>> > >>> > >>> > On Fri, Jan 28, 2011 at 12:50 PM, Charlie Arehart < >>> [email protected]> >>> > wrote: >>> >> >>> >> Well, if he just outputted the result in 2 to the screen, it would >>> show up >>> >> to the ser as the result in 3, of course, right? :-) >>> >> >>> >> That’s where I’m not clear on the confusion, but getting him to >>> clarify >>> >> will indeed help. >>> >> >>> >> >>> >> >>> >> /charlie >>> >> >>> >> >>> >> >>> >> From: [email protected] [mailto:[email protected]] On Behalf Of Ajas >>> Mohammed >>> >> Sent: Friday, January 28, 2011 12:45 PM >>> >> To: [email protected] >>> >> Subject: Re: [ACFUG Discuss] XML data showing in dump but not in >>> cfoutput >>> >> >>> >> >>> >> >>> >> Charlie, >>> >> >>> >> I think He wants the result you show in 3.Michael feel free to correct >>> me. >>> >> >>> >> I got him to the point like you showed in 2 i.e. with <p> tags etc by >>> >> using replacelist function to get rid of CDATA etc. >>> >> <p class="meta"><strong>Property >>> >> Description:</strong>#replacelist(shortDescription, >>> '<![CDATA[,]]>','')#</p> >>> >> >>> >> Steve mentioned a link that would take care of replacing html tags. >>> >> >>> >> <Ajas Mohammed /> >>> >> http://ajashadi.blogspot.com >>> >> We cannot become what we need to be, remaining what we are. >>> >> No matter what, find a way. Because thats what winners do. >>> >> You can't improve what you don't measure. >>> >> Quality is never an accident; it is always the result of high >>> intention, >>> >> sincere effort, intelligent direction and skillful execution; it >>> represents >>> >> the wise choice of many alternatives. >>> >> >>> >> On Fri, Jan 28, 2011 at 12:37 PM, Charlie Arehart < >>> [email protected]> >>> >> wrote: >>> >> >>> >> That wasn’t clear to me. Thanks. >>> >> >>> >> So let’s make it simple for everyone to follow along and perhaps >>> resolve >>> >> things. It would be as if you (Michael) did this (always helpful to >>> offer a >>> >> simple reproducible case): >>> >> >>> >> <cfset x = “<![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. </strong>]]>”> >>> >> >>> >> <cfoutput> >>> >> >>> >> #x# >>> >> >>> >> </cfoutput> >>> >> >>> >> What would be the output you would want to appear? >>> >> >>> >> 1) Is it: >>> >> >>> >> <![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.</strong>]]> >>> >> >>> >> --- >>> >> 2) Or do you want: >>> >> >>> >> <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.</strong> >>> >> >>> >> ----- >>> >> 3) Or do you want: >>> >> >>> >> Location. >>> >> >>> >> This condo property is located in Celebration. Old Town is an area >>> >> attraction. Another nearby attraction is Wide World of Sports. >>> >> >>> >> Features. >>> >> >>> >> --- >>> >> >>> >> >>> >> /charlie >>> >> >>> >> >>> >> >>> >> ------------------------------------------------------------- >>> >> 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 >>> >> ------------------------------------------------------------- >>> > >>> >>> >>> ------------------------------------------------------------- >>> To unsubscribe from this list, manage your profile @ >>> http://www.acfug.org?falogin.edituserform >>> >>> For more info, see http://www.acfug.org/mailinglists >>> Archive @ http://www.mail-archive.com/discussion%40acfug.org/ >>> List hosted by http://www.fusionlink.com >>> ------------------------------------------------------------- >>> >>> >>> >>> >> >> >> -- >> 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 > > >
