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.