Advertise Mobile SDKs Books Events Forum News Social Networking Support Us
Follow @iphonedevsdk on Twitter

Mockup & CodeGen, iPhone & iPad
($9.99)

Make your own iPhone apps
and run them live!
(free)

Manu
($0.99)

Want your application or service advertised on iPhone Dev SDK?

Go Back   iPhone Dev SDK Forum > iPhone SDK Development Forums > iPhone SDK Development

Reply
 
LinkBack Thread Tools Display Modes
Old 06-19-2009, 12:02 AM   #1 (permalink)
Registered Member
 
Join Date: Mar 2009
Posts: 157
Default RSS Reader

I've followed the popular tutorial on the apple blog on how to create a simple RSS reader, and was able to do so. I also made an "advanced" reader using

iPhone SDK Tutorial: Building an Advanced RSS reader using TouchXML (Part 1) | dBlog.com.au

However, neither of these programs can open up the RSS that I want them to. I understand the code when I read it, but I couldn't tell you what the problem is. Does anyone know what could be keeping it from opening the feed?

And I'm what you would call a beginner with this stuff, so there are no stupid replies.
Any help would be much appreciated,
thanks.
starwarsdevwookie59 is offline   Reply With Quote
Old 06-19-2009, 02:21 AM   #2 (permalink)
Dr. Touch Cocoa Helpdesk
iPhone Dev SDK Supporter
 
Join Date: Sep 2008
Location: Vienna, Austria
Posts: 537
Send a message via AIM to Oliver Drobnik Send a message via MSN to Oliver Drobnik Send a message via Skype™ to Oliver Drobnik
Default

Quote:
Originally Posted by starwarsdevwookie59 View Post
I've followed the popular tutorial on the apple blog on how to create a simple RSS reader, and was able to do so. I also made an "advanced" reader using

iPhone SDK Tutorial: Building an Advanced RSS reader using TouchXML (Part 1) | dBlog.com.au

However, neither of these programs can open up the RSS that I want them to. I understand the code when I read it, but I couldn't tell you what the problem is. Does anyone know what could be keeping it from opening the feed?

And I'm what you would call a beginner with this stuff, so there are no stupid replies.
Any help would be much appreciated,
thanks.
You have to tell us what feed your are trying to open.
__________________
regards

Oliver Drobnik
Cocoanetics - Our DNA is programmed in Objective-C.

Linguan – makes localizing strings file fun!

Cocoanetics Parts Store – easy to use yet professionally looking components that you can use to spruce up your own apps. Augmented Reality, Calendar Control, Pin Lock or Purchase Button are only some examples. You get full source code, no static library crap, and lifetime support. Check it out today!
Oliver Drobnik is offline   Reply With Quote
Old 06-19-2009, 12:33 PM   #3 (permalink)
Registered Member
 
Join Date: Mar 2009
Posts: 157
Default

Right, sorry.

feed://www.medicalmommas.com/profiles/blog/feed?promoted=1&xn_auth=no

It's for a project I've sort of been hired to do.
starwarsdevwookie59 is offline   Reply With Quote
Old 06-19-2009, 12:48 PM   #4 (permalink)
Registered Member
 
Join Date: Aug 2008
Location: Memphis, TN, USA
Age: 24
Posts: 3,544
Send a message via ICQ to smithdale87 Send a message via AIM to smithdale87 Send a message via Skype™ to smithdale87
Default

Quote:
However, neither of these programs can open up the RSS that I want them to. I understand the code when I read it, but I couldn't tell you what the problem is. Does anyone know what could be keeping it from opening the feed?
Are you getting any errors that we need to be aware of?
smithdale87 is offline   Reply With Quote
Old 06-19-2009, 01:45 PM   #5 (permalink)
Registered Member
 
Join Date: Mar 2009
Posts: 157
Default

Sorry again, I'm not thinking. There are no errors on the build, two warnings on the simple reader though. Then when I try to open it on the simple one it pops up with error five. The other reader just doesn't load anything in the cells.

Thanks again for any help.


And sorry about that...
starwarsdevwookie59 is offline   Reply With Quote
Old 06-19-2009, 02:27 PM   #6 (permalink)
Registered Member
 
Join Date: Aug 2008
Location: Memphis, TN, USA
Age: 24
Posts: 3,544
Send a message via ICQ to smithdale87 Send a message via AIM to smithdale87 Send a message via Skype™ to smithdale87
Default

I'm assuming error 5 is from the xml parser. Did you look up what error 5 is?
Code:
  NSXMLParserPrematureDocumentEndError = 5,


NSXMLParserPrematureDocumentEndError - The document ended unexpectedly.
smithdale87 is offline   Reply With Quote
Old 06-19-2009, 02:32 PM   #7 (permalink)
Registered Member
 
Join Date: Mar 2009
Posts: 157
Default

Right, I did look that up. So what should I do to fix it?

Thanks again for your help

Also-I downloaded ThumStruck, very impressive.
starwarsdevwookie59 is offline   Reply With Quote
Old 06-19-2009, 02:40 PM   #8 (permalink)
Registered Member
 
Join Date: Aug 2008
Location: Memphis, TN, USA
Age: 24
Posts: 3,544
Send a message via ICQ to smithdale87 Send a message via AIM to smithdale87 Send a message via Skype™ to smithdale87
Default

Quote:
Originally Posted by starwarsdevwookie59 View Post
Right, I did look that up. So what should I do to fix it?

Thanks again for your help

Also-I downloaded ThumStruck, very impressive.
When I get that error, it most likely means that the XML is not formatted correctly, either a tag didnt get closed when it should have something like that..

In order to determine exactly where in the feed the problem occurs, I like to print out the name of the elements in the didStartElement and didEndElement parser delegate methods.

Code:
- (void)parser:(NSXMLParser *)parser didStartElement:(NSString *)elementName namespaceURI:(NSString *)namespaceURI qualifiedName:(NSString *)qualifiedName attributes:(NSDictionary *)attributeDict
{
     NSLog(@"<%@>", elementName);

// do other stuff
}

- (void)parser:(NSXMLParser *)parser didEndElement:(NSString *)elementName namespaceURI:(NSString *)namespaceURI qualifiedName:(NSString *)qName
{
    NSLog(@"</%@>", elementName);
}

Now you should be able to see what element you were on when the error gets thrown. Just look @ the console output.
smithdale87 is offline   Reply With Quote
Old 06-20-2009, 06:38 PM   #9 (permalink)
Registered Member
 
Join Date: Mar 2009
Posts: 157
Default

Quote:
Originally Posted by smithdale87 View Post
When I get that error, it most likely means that the XML is not formatted correctly, either a tag didnt get closed when it should have something like that..

In order to determine exactly where in the feed the problem occurs, I like to print out the name of the elements in the didStartElement and didEndElement parser delegate methods.

Code:
- (void)parser:(NSXMLParser *)parser didStartElement:(NSString *)elementName namespaceURI:(NSString *)namespaceURI qualifiedName:(NSString *)qualifiedName attributes:(NSDictionary *)attributeDict
{
     NSLog(@"<%@>", elementName);

// do other stuff
}

- (void)parser:(NSXMLParser *)parser didEndElement:(NSString *)elementName namespaceURI:(NSString *)namespaceURI qualifiedName:(NSString *)qName
{
    NSLog(@"</%@>", elementName);
}

Now you should be able to see what element you were on when the error gets thrown. Just look @ the console output.
Nice. Good idea. I put the code in just like you put it, along with the other stuff in the function. But all that's coming up in the console is:

Code:
[Session started at 2009-06-20 18:33:20 -0400.]
2009-06-20 18:33:22.696 TAB RSS reader[12695:20b] error parsing XML: Unable to download story feed from web site (Error code 5 )
I can't thank you enough for helping me with this. I appreciate your helpful replies.
starwarsdevwookie59 is offline   Reply With Quote
Old 05-03-2010, 11:10 AM   #10 (permalink)
Registered Member
 
Join Date: Jan 2010
Location: NYC
Posts: 37
Default

Quote:
Originally Posted by starwarsdevwookie59 View Post
Nice. Good idea. I put the code in just like you put it, along with the other stuff in the function. But all that's coming up in the console is:

Code:
[Session started at 2009-06-20 18:33:20 -0400.]
2009-06-20 18:33:22.696 TAB RSS reader[12695:20b] error parsing XML: Unable to download story feed from web site (Error code 5 )
I can't thank you enough for helping me with this. I appreciate your helpful replies.

This probably means that it is trying to parse the file before it has had a chance to download any part of it yet.
beleg_1998 is offline   Reply With Quote
Reply

Bookmarks

Tags
advanced, reader, rss, simple

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On



» Advertisements
» Online Users: 888
21 members and 867 guests
armmzz, at0m87, aziz, Azuresilver, cacao, Desert Diva, Erwin, eviolet4, ghz.rai, headkaze, mavericki, mikeirvingapps, nicko, pratikchandak, ramonpadillas, Remzuidferdenz, Shimi256, Thomas, ziocleto
Most users ever online was 1,187, 10-11-2011 at 08:09 AM.
» Stats
Members: 158,311
Threads: 89,035
Posts: 379,820
Top Poster: BrianSlick (7,086)
Welcome to our newest member, ramonpadillas
Powered by vBadvanced CMPS v3.1.0

All times are GMT -5. The time now is 05:24 AM.
Powered by vBulletin® Version 3.8.0
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.
Search Engine Friendly URLs by vBSEO 3.3.0