Discussion Forums  >  Uncategorized

Replies: 8    Views: 353

baywebnz
Aspiring developer
Profile
Posts: 92
Reg: Oct 25, 2010
location unknow...
920
02/13/11 06:22 PM (15 years ago)

RSS Issues

Hi I'm having a number of issues with RSS feeds: 1) The title of the first item does not appear correctly instead the overall feed title appears. I think this maybe a genuine bug as it occurs with the sample feed also and even on the example screenshots in the control panel. 2) On some feeds character entity references appear instead of the actual character - eg. & will show in the description instead of & 3) I have one feed which I just can not get to work www.rotoruadailypost.co.nz/rss/content/sport/ It appears to work ok but when a story is clicked instead of showing the story the app just closes!! I have checked the XML and all seems ok - I have even tried running the feed through Yahoo Pipes in order to reformat it (other feeds from Yahoo Pipes work fine) but the same occurs. Any help would be greatly appreciated.
 
David @ buzztouch
buzztouch Evangelist
Profile
Posts: 6866
Reg: Jan 01, 2010
Monterey, CA
78,840
like
02/13/11 11:25 PM (15 years ago)
Looking into this. Stay tuned. RSS Is WAY TOO complicated these days. The original idea was great, today, almost NO FEEDS follow the the documented standard - sigh...I'll figure it out.
 
baywebnz
Aspiring developer
Profile
Posts: 92
Reg: Oct 25, 2010
location unknow...
920
like
02/14/11 12:17 AM (15 years ago)
As always david - much appreciated!
 
David @ buzztouch
buzztouch Evangelist
Profile
Posts: 6866
Reg: Jan 01, 2010
Monterey, CA
78,840
like
02/14/11 01:03 AM (15 years ago)
OK. got the 'first item' issue figured out and fixed. Good reminder, I was tinkering with that the other day and didn't get it done. Cool. The next issue: The RSS feed you tried that crashes the browser. I also get it to crash. I have traced the problem to this but still figuring a solution: The URL for the 'story' leads to a page with a bunch of ads and other mumbe-jumbo on it. Many of the ads load in iFrames. If you're not sure what they are, just know that iOS + iFrames = a big fight! So, one of the frames, in the story page, is trying to load this: http://data.apn.co.nz/apnnz/hserver/SITE=REGRDP/AREA=SPORT.STY/size=bigbanner/SA=2/random=913692217/ viewid=6435664562/KEYWORD=three+secondhalf+tries+saw+new+zealand+warriors+shut+out+ parramatta+eels+244+in+preseason+nrl+trial+at+rotoruas+international+stadium+today+ tries+to+manu+vatuvei+new+signing+krisnan+inu+gave+warriors+ If you paste that URL in a browser window you'll see it's just a banner ad. Working on a fix... In the meantime, have a look at the Console when you're running the app in the simulator, it really shows lots of goodies. This is how I've been able to trace this so far. I spent hours and hours and hours coding this project so nearly every single click or tap outputs something useful to the console so peeps like you and I could get an idea of what was going on when things didn't work right. This is one of those times. Also... you can see the file system where the simualtor stores files. It's normally yourname > Library > Application Support > iPhone Simuator > Version (4.2 for me) Find the documents directory for the app installed on the simulator. Open it along side the sim then click the Refresh button. You'll see this directory get emptied then refilled with misc. stuff. Refresh the RSS feed you were working on that contains the bogus character data (ampersands). Next, find the cached copy of the data in this directory. Open it with a text editor to see what is being saved to the device. This will help determine where the crazy characters are coming from. The .xml file that is saved to the device is saved as UTF8 character data. This may or may not be intersting to you, but I figured you could get a look into this while I figured out the web-view crash with iFrame problem ;-)
 
David @ buzztouch
buzztouch Evangelist
Profile
Posts: 6866
Reg: Jan 01, 2010
Monterey, CA
78,840
like
02/14/11 02:42 AM (15 years ago)
OK. I've updated the source-code on the download server in a few places, you'll need to re-fetch the code for your project. I was able to fix the RSS Parser, and the Crash when clicking an RSS Story in the URL you posted. This was a good find, there are several reports of this happeneing, depending on the URL that the app is trying to load. Lots and lots of banner ads crashed the app's built-in browser (even though they wored in Safari) and finding and fixing this was good ;-) I'll need you to investigate the funny characters you reported by looking at the data saved in the directory (see previous post) or point me to a URL that does this and I'll look.
 
baywebnz
Aspiring developer
Profile
Posts: 92
Reg: Oct 25, 2010
location unknow...
920
like
02/14/11 03:10 AM (15 years ago)
Awesome work on the first 2 issues David thanks! Now re: the amphersands The url that I am working with is this: http://www.eventfinder.co.nz/feed/events/rotorua/whatson/upcoming.rss And here is the cached data: Events in Rotorua http://www.eventfinder.co.nz/ 2011-02-24T20:00:00Z [email protected] (Eventfinder) en Viki-Mae and Friends http://www.eventfinder.co.nz/2010/oct/rotorua/viki-mae-and-friends?utm_medium=rss Local singer Viki-Mae will tantalise you with her own style of soul, jazz, and blues arrangements of songs you know and love. Often she is join by many of her talented music friends. You can view some of her music ...Rotorua | Monday, 4 October 2010 - Monday, 30 May 2011 Rotorua]]> 75120 2010-10-04T19:30:00Z Elizabeth Marvelly - Album Premier http://www.eventfinder.co.nz/2011/feb/rotorua/elizabeth-marvelly-album-premier?utm_medium=rss Elizabeth Marvelly is back. Now 21, the Kiwi songstress returns with an album conceived through the whirlwind experiences of three years of international touring. Described by Prime Minister John Key as a 'national ...Rotorua | Tuesday, 15 February 2011 Rotorua]]> 85993 2011-02-15T17:30:00Z
 
David @ buzztouch
buzztouch Evangelist
Profile
Posts: 6866
Reg: Jan 01, 2010
Monterey, CA
78,840
like
02/14/11 03:49 AM (15 years ago)
ok... good work. I wonder how many times you're going to have to re-download you proejct, funny. You'll need to do it again, I changed two files on the download server. I was able to figure out the issue and 'fix' some of it The 'crazy characters' in the RSS feed are called 'html entities' and are NOT ALLOWED in UTF-8 data. This is just an example of an RSS feed that is not totally playing by the rules. The characters they are including are common because most RSS data is displayed on web-page, in a web-browser. Web browsers now exactly how to handle these characters - iOS does not. Of course iOS would now what to do if we displayed this in a web-page, we are simply 'parsing it' and making a list of items to tap on. The text in the list is not HTML so it doesn't have any understanding of the html entities like we are seeing in the RSS data. I built a little routine that strips-out the apostrphe, quote, and a few other common characters but it won't remove the HTML you're seeing. Like the paragraph tag that starts each description, etc. For that, you'll need to modify the RSS feed to not include html formatting int he description text. If the RSS feed is no under your control, you have a few options. a) yell at the folks that our outputting it b) choose another feed that outputs valid UTF-8 data c) Run the URL throug a proxy-server. This is a fancy name for services online that re-format RSS feeds to customizable layouts. The idea is that you enter a URL (the the feed) and make some choices in a control panel. The service then provides you a new URL to use so the output is what you want. I've never done this but there are some discussions about it in this form. Maybe search RSS? This is the best I could do for this situation. Others will benefit from your discovery and OUR (you and me) effort - good work and good luck.
 
baywebnz
Aspiring developer
Profile
Posts: 92
Reg: Oct 25, 2010
location unknow...
920
like
02/14/11 03:56 AM (15 years ago)
Brilliant David, thanks for your efforts! You really should have a 'donate' button, or 'buy me a coffee' button! I can easily run this through Yahoo Pipes to strip out the HTML tags - it just wouldn't do the rest so between us we've got there. Thanks once again.
 
David @ buzztouch
buzztouch Evangelist
Profile
Posts: 6866
Reg: Jan 01, 2010
Monterey, CA
78,840
like
02/14/11 04:00 AM (15 years ago)
Funny... I just starting writing a routine! The parse method in the code is not-changeable, way too many things rely on it. However, duh, since this only comes up on RSS feed tites and descirptions, I'll just clean that up - funny. Glad you found a solution too. I'll get this one done tomorrow. 3:00 AM here, done for the night...
 

Login + Screen Name Required to Post

pointerLogin to participate so you can start earning points. Once you're logged in (and have a screen name entered in your profile), you can subscribe to topics, follow users, and start learning how to make apps like the pros.