iPhone Objective C KissXML XMLDocument String?

BoiniaTaill

New Member
I am creating an app for a friend of mine's podcast. The app has an rss xml file with its URL. After looking around on here, I decided to use KissXML for its documentation, but I can't seem to get the DDXMLDocument working correctly. I create a connection with the podcast's rss feed, with a URL of the form \[code\]NSString *podcastURL = [NSString stringWithFormat:@"http://podcast.website.com/rss/"];NSURL *requestURL = [NSURL URLWithString:podcastURL];NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:requestURL];NSURLConnection *connection = [[NSURLConnection alloc] initWithRequest:request delegate:self]\[/code\]Then, in the delegate method -(void)connection:(NSURLConnection *)connection didReceiveData:(NSData *)dataI am trying to use the received data to create the DDXMLDocument. I've tried initWithData and initWithString after creating the string with...\[code\]NSError *error = nil;NSString *response = [[NSString alloc] initWithData:data encoding:NSUTF8StringEncoding];\[/code\]I NSLog this string to see its contents, and it looks like a perfectly fine xml document to me. I create the XMLDoc with\[code\]DDXMLDocument *responseDoc = [[DDXMLDocument alloc] initWithXMLString:response options:0 error:&error];\[/code\]But when I try to examine this new XMLDoc, all I get is NULL. Can anybody see if I'm doing anything wrong? The XML String response looks valid to me, but I suppose I don't really know. Thanks for any help!
 
Back
Top