 |
 |
|
 |
06-18-2009, 11:02 PM
|
#1 (permalink)
|
|
Registered Member
Join Date: Mar 2009
Posts: 123
|
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.
|
|
|
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
|
Quote:
Originally Posted by starwarsdevwookie59
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!
|
|
|
06-19-2009, 11:33 AM
|
#3 (permalink)
|
|
Registered Member
Join Date: Mar 2009
Posts: 123
|
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.
|
|
|
06-19-2009, 11:48 AM
|
#4 (permalink)
|
|
Magic Hands' Daddy
Join Date: Aug 2008
Location: Memphis, TN, USA
Age: 22
Posts: 1,372
|
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?
|
|
|
06-19-2009, 12:45 PM
|
#5 (permalink)
|
|
Registered Member
Join Date: Mar 2009
Posts: 123
|
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...
|
|
|
06-19-2009, 01:27 PM
|
#6 (permalink)
|
|
Magic Hands' Daddy
Join Date: Aug 2008
Location: Memphis, TN, USA
Age: 22
Posts: 1,372
|
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.
|
|
|
06-19-2009, 01:32 PM
|
#7 (permalink)
|
|
Registered Member
Join Date: Mar 2009
Posts: 123
|
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.
|
|
|
06-19-2009, 01:40 PM
|
#8 (permalink)
|
|
Magic Hands' Daddy
Join Date: Aug 2008
Location: Memphis, TN, USA
Age: 22
Posts: 1,372
|
Quote:
Originally Posted by starwarsdevwookie59
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.
|
|
|
06-20-2009, 05:38 PM
|
#9 (permalink)
|
|
Registered Member
Join Date: Mar 2009
Posts: 123
|
Quote:
Originally Posted by smithdale87
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.
|
|
|
 |
| Thread Tools |
|
|
| Display Modes |
Linear Mode
|
Posting Rules
|
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
HTML code is Off
|
|
|
|
» Advertisements |
» Online Users: 549 |
| 43 members and 506 guests |
| AptoTech, Avalanchis, byDecker, carminati, CHV, develsolutions, dre, Duncan C, embedded, flamingliquid, freedoom, GoNXaS, gshaviv, hatembr, headkaze, HemiMG, hstaniloff, iTrackiGiveaway, JaredJohnson325, jmonroe, Julie, jyu, listingboat, masc2279, mistergod, MrMattMac, myPhone, prophox, Raazo, rocketman240, Rudy, ryguy2503, sayer, seilinho, SimonHodgkiss, soga, TapThatApp, toughturtle, TunaNugget, warmi, whale88 |
| Most users ever online was 779, 05-11-2009 at 09:55 AM. |
» Stats |
Members: 24,185
Threads: 38,957
Posts: 170,914
Top Poster: smasher (2,565)
|
| Welcome to our newest member, JaredJohnson325 |
|