Advertise Books Events Forum News Social Networking Support Us

sdkIQ for iPhone
($4.99)

Shape Up
($0.99)

Your First iPhone App
($1.99)

iVidCam Free
(free)

Kid Art
($0.99)

iPUBQUIZ
(£1.19)

ArtStudio
($3.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-18-2009, 11:02 PM   #1 (permalink)
Registered Member
 
Join Date: Mar 2009
Posts: 123
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, 01:21 AM   #2 (permalink)
Dr. Touch Cocoa Helpdesk
iPhone Dev SDK Supporter
 
Join Date: Sep 2008
Location: Vienna, Austria
Posts: 477
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
Dr. Touch


Dr. Touch’s 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 by Dr. Touch himself. Check it out today!
Oliver Drobnik is offline   Reply With Quote
Old 06-19-2009, 11:33 AM   #3 (permalink)
Registered Member
 
Join Date: Mar 2009
Posts: 123
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, 11:48 AM   #4 (permalink)
Magic Hands' Daddy
 
Join Date: Aug 2008
Location: Memphis, TN, USA
Age: 22
Posts: 1,372
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?
__________________
Games
AppRoach - (v1.0)
7 Deaths In Nagamachi (v1.1)
Segment (v1.2)
ThumStruck Free (v1.5)
Plummet - new (v1.0)
ThumStruck 2! - Coming Soon

Apps
ArtsMemphis - (v1.0)
Elvis Mobile (v1.1)
DataLoss DB - (v1.1)
Lovers & Haters - (v1.0)
smithdale87 is offline   Reply With Quote
Old 06-19-2009, 12:45 PM   #5 (permalink)
Registered Member
 
Join Date: Mar 2009
Posts: 123
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, 01:27 PM   #6 (permalink)
Magic Hands' Daddy
 
Join Date: Aug 2008
Location: Memphis, TN, USA
Age: 22
Posts: 1,372
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.
__________________
Games
AppRoach - (v1.0)
7 Deaths In Nagamachi (v1.1)
Segment (v1.2)
ThumStruck Free (v1.5)
Plummet - new (v1.0)
ThumStruck 2! - Coming Soon

Apps
ArtsMemphis - (v1.0)
Elvis Mobile (v1.1)
DataLoss DB - (v1.1)
Lovers & Haters - (v1.0)
smithdale87 is offline   Reply With Quote
Old 06-19-2009, 01:32 PM   #7 (permalink)
Registered Member
 
Join Date: Mar 2009
Posts: 123
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, 01:40 PM   #8 (permalink)
Magic Hands' Daddy
 
Join Date: Aug 2008
Location: Memphis, TN, USA
Age: 22
Posts: 1,372
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.
__________________
Games
AppRoach - (v1.0)
7 Deaths In Nagamachi (v1.1)
Segment (v1.2)
ThumStruck Free (v1.5)
Plummet - new (v1.0)
ThumStruck 2! - Coming Soon

Apps
ArtsMemphis - (v1.0)
Elvis Mobile (v1.1)
DataLoss DB - (v1.1)
Lovers & Haters - (v1.0)
smithdale87 is offline   Reply With Quote
Old 06-20-2009, 05:38 PM   #9 (permalink)
Registered Member
 
Join Date: Mar 2009
Posts: 123
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
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


Enter the iPhone App Challenge!  Win $500!
» Advertisements
» Stats
Members: 24,185
Threads: 38,957
Posts: 170,914
Top Poster: smasher (2,565)
Welcome to our newest member, JaredJohnson325
Powered by vBadvanced CMPS v3.1.0

All times are GMT -5. The time now is 09:58 AM.
Powered by vBulletin® Version 3.8.0
Copyright ©2000 - 2010, Jelsoft Enterprises Ltd.
Search Engine Friendly URLs by vBSEO 3.2.0