What's the matter here? RSS feed error
Can anyone see what's the matter with this code? I'm consuming a RSS feed, using the following code ... [quote] cfhttp url=http://cybergrass.com/newsrss10.php; method=get/cfhttp cfset objRSS = xmlParse(cfhttp.filecontent) [/quote] But a CFDUMP of objRSS on the next line gives me the following error: [quote] End of entity not allowed; an end tag is missing. [/quote] The guy generating the feed says he's validated his xml page, and says there's nothing wrong with it. So Before I tell him he's wrong, is there anything wrong with my code? Can anyone else get this RSS code satisfactorily? Cheers, Michael Kear Windsor, NSW, Australia AFP Webworks. ~| Archives: http://www.houseoffusion.com/lists.cfm?link=t:4 Subscription: http://www.houseoffusion.com/lists.cfm?link=s:4 Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4 Signup for the Fusion Authority news alert and keep up with the latest news in ColdFusion and related topics. http://www.fusionauthority.com/signup.cfm
RE: What's the matter here? RSS feed error
Can anyone see what's the matter with this code? I'm consuming a RSS feed, using the following code ... [quote] cfhttp url=http://cybergrass.com/newsrss10.php; method=get/cfhttp cfset objRSS = xmlParse(cfhttp.filecontent) [/quote] But a CFDUMP of objRSS on the next line gives me the following error: [quote] End of entity not allowed; an end tag is missing. [/quote] The guy generating the feed says he's validated his xml page, and says there's nothing wrong with it. So Before I tell him he's wrong, is there anything wrong with my code? Can anyone else get this RSS code satisfactorily? I was able to fetch his RSS file successfully, and it appears to be valid XML to me, as rendered by Internet Explorer. You might use CFDUMP on CFHTTP.FileContent, to see what you're getting back. Dave Watts, CTO, Fig Leaf Software http://www.figleaf.com/ voice: (202) 797-5496 fax: (202) 797-5444 ~| Archives: http://www.houseoffusion.com/lists.cfm?link=t:4 Subscription: http://www.houseoffusion.com/lists.cfm?link=s:4 Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4 Signup for the Fusion Authority news alert and keep up with the latest news in ColdFusion and related topics. http://www.fusionauthority.com/signup.cfm
RE: What's the matter here? RSS feed error
Thanks for your suggestion, Dave. I ran the following: cfhttp url=http://cybergrass.com/newsrss10.php; method=get/cfhttp cfdump var=#cfhttp.filecontent# And the file doesn't end properly. The last few characters of the CFDUMP look like this: [quote] name=Newsamp;file=articleamp;sid=59/link descriptionToday is the 11th birthday for Cybergrass [/quote] The dump is nowhere near long enough. Yet, when I put the same code in a bare-bones .cfm page, with no formatting, tables, other content, just the minimum required for a properly formatted html page, I get a properly formatted struct with the xml content properly arrayed there. What can be truncating the feed? There's nothing special about the page, (which is at http://bluegrass.org.au/Magazine/USANews/index2.cfm ) that I can see that might be truncating the XML. Is this a known problem of some kind? There is no content except a CF/LF between getting the XML file, and CFDUMPing it. I'd have thought any other content wouldn't interfere, even if it had something in it that the XML parser didn't like. Cheers, Michael Kear Windsor, NSW, Australia AFP Webworks. -Original Message- From: Dave Watts [mailto:[EMAIL PROTECTED] Sent: Thursday, 11 September 2003 1:26 AM To: CF-Talk Subject: RE: What's the matter here? RSS feed error Can anyone see what's the matter with this code? I'm consuming a RSS feed, using the following code ... [quote] cfhttp url=http://cybergrass.com/newsrss10.php; method=get/cfhttp cfset objRSS = xmlParse(cfhttp.filecontent) [/quote] But a CFDUMP of objRSS on the next line gives me the following error: [quote] End of entity not allowed; an end tag is missing. [/quote] The guy generating the feed says he's validated his xml page, and says there's nothing wrong with it. So Before I tell him he's wrong, is there anything wrong with my code? Can anyone else get this RSS code satisfactorily? I was able to fetch his RSS file successfully, and it appears to be valid XML to me, as rendered by Internet Explorer. You might use CFDUMP on CFHTTP.FileContent, to see what you're getting back. Dave Watts, CTO, Fig Leaf Software http://www.figleaf.com/ voice: (202) 797-5496 fax: (202) 797-5444 ~| Archives: http://www.houseoffusion.com/lists.cfm?link=t:4 Subscription: http://www.houseoffusion.com/lists.cfm?link=s:4 Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4 Get the mailserver that powers this list at http://www.coolfusion.com
RE: What's the matter here? RSS feed error
Thanks for your suggestion, Dave. I ran the following: cfhttp url=http://cybergrass.com/newsrss10.php; method=get/cfhttp cfdump var=#cfhttp.filecontent# And the file doesn't end properly. The last few characters of the CFDUMP look like this: [quote] name=Newsamp;file=articleamp;sid=59/link descriptionToday is the 11th birthday for Cybergrass [/quote] The dump is nowhere near long enough. Yet, when I put the same code in a bare-bones .cfm page, with no formatting, tables, other content, just the minimum required for a properly formatted html page, I get a properly formatted struct with the xml content properly arrayed there. What can be truncating the feed? ... Are you running CFMX 6.0? I've encountered things like this several times, that may or may not have been fixed by Updaters 1-3. They have supposedly been fixed in CFMX 6.1. Honestly, it's been so long since I've trusted the CFHTTP tag with anything important that I don't have a more specific answer than that. There are lots of HTTP client alternatives, and I've generally used one of those instead. Dave Watts, CTO, Fig Leaf Software http://www.figleaf.com/ voice: (202) 797-5496 fax: (202) 797-5444 ~| Archives: http://www.houseoffusion.com/lists.cfm?link=t:4 Subscription: http://www.houseoffusion.com/lists.cfm?link=s:4 Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4 Your ad could be here. Monies from ads go to support these lists and provide more resources for the community. http://www.fusionauthority.com/ads.cfm
RE: What's the matter here? RSS feed error
AH!!! So it could be a CFMX6.0 bug! We're upgrading to 6.1 in the next couple of weeks, so I might just put that page in the under construction bin till then and see if the problem goes away all by itself. Thanks Dave. Cheers, Michael Kear Windsor, NSW, Australia AFP Webworks. -Original Message- From: Dave Watts [mailto:[EMAIL PROTECTED] Sent: Thursday, 11 September 2003 3:59 AM To: CF-Talk Subject: RE: What's the matter here? RSS feed error Thanks for your suggestion, Dave. I ran the following: cfhttp url=http://cybergrass.com/newsrss10.php; method=get/cfhttp cfdump var=#cfhttp.filecontent# And the file doesn't end properly. The last few characters of the CFDUMP look like this: [quote] name=Newsamp;file=articleamp;sid=59/link descriptionToday is the 11th birthday for Cybergrass [/quote] The dump is nowhere near long enough. Yet, when I put the same code in a bare-bones .cfm page, with no formatting, tables, other content, just the minimum required for a properly formatted html page, I get a properly formatted struct with the xml content properly arrayed there. What can be truncating the feed? ... Are you running CFMX 6.0? I've encountered things like this several times, that may or may not have been fixed by Updaters 1-3. They have supposedly been fixed in CFMX 6.1. Honestly, it's been so long since I've trusted the CFHTTP tag with anything important that I don't have a more specific answer than that. There are lots of HTTP client alternatives, and I've generally used one of those instead. Dave Watts, CTO, Fig Leaf Software http://www.figleaf.com/ voice: (202) 797-5496 fax: (202) 797-5444 ~| Archives: http://www.houseoffusion.com/lists.cfm?link=t:4 Subscription: http://www.houseoffusion.com/lists.cfm?link=s:4 Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4 Get the mailserver that powers this list at http://www.coolfusion.com
Re: What's the matter here? RSS feed error
On Wednesday, Sep 10, 2003, at 11:11 US/Pacific, Mike Kear wrote: AH!!! So it could be a CFMX6.0 bug! We're upgrading to 6.1 in the next couple of weeks, so I might just put that page in the under construction bin till then and see if the problem goes away all by itself. cfhttp received a lot of TLC in CFMX 6.1 - hopefully it will have solved your problems! ~| Archives: http://www.houseoffusion.com/lists.cfm?link=t:4 Subscription: http://www.houseoffusion.com/lists.cfm?link=s:4 Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4 This list and all House of Fusion resources hosted by CFHosting.com. The place for dependable ColdFusion Hosting. http://www.cfhosting.com
RE: What's the matter here? RSS feed error
I've identified the source of the problem. There's a registered trade mark symbol in one of the stories (chr(0174) or HexAE ) and that's where the feed truncates in the production server.As it happens, the feed works fine on my CFMX6.1 dev server so that's encouraging as several of you have indicated. I tried using a regex to strip out the problem character (hex AE) but it still didn't work. I'm assuming it was CFHTTP that was barfing on the character and therefore didn't import the rest of the feed once it got the character it choked on, so the damage was already done by the time the REReplace got a chance to look at the cfhttp content. Does that sound right? (Or since it was the first REReplace I've written maybe I got that wrong) Here's the code with the regex I used ... [quote] cfhttp url=http://cybergrass.com/newsrss10.php; method=get/cfhttp !--- Strip out a character causing problems - the 'registered' symbol Chr(174) --- cfset objRSStemp = REReplace(cfhttp.filecontent, \xAE , reg;, ALL) cfset objRSS = xmlParse(objRSStemp) [/quote] Cheers, Michael Kear Windsor, NSW, Australia AFP Webworks. -Original Message- From: Sean A Corfield [mailto:[EMAIL PROTECTED] Sent: Thursday, 11 September 2003 10:27 AM To: CF-Talk Subject: Re: What's the matter here? RSS feed error On Wednesday, Sep 10, 2003, at 11:11 US/Pacific, Mike Kear wrote: AH!!! So it could be a CFMX6.0 bug! We're upgrading to 6.1 in the next couple of weeks, so I might just put that page in the under construction bin till then and see if the problem goes away all by itself. cfhttp received a lot of TLC in CFMX 6.1 - hopefully it will have solved your problems! ~| Archives: http://www.houseoffusion.com/lists.cfm?link=t:4 Subscription: http://www.houseoffusion.com/lists.cfm?link=s:4 Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4 Get the mailserver that powers this list at http://www.coolfusion.com