There was a small problem getting the contents of the xml file (using TouchXML).
My first request works very well, looks something like this:
NSString *url = [NSString stringWithFormat:STATION_ID, latitude, longtitude];
CXMLDocument *rssParser = [[CXMLDocument alloc] initWithContentsOfURL:[NSURL URLWithString:url] options:0 error:nil];
NSLog(@"%@",rssParser);
so this log gives me the full xml file.
after that, in another method, I try to do the same:
NSString *url = [NSString stringWithFormat:WEATHER_URL, [positionInformation objectForKey:@"stationId"]];
CXMLDocument *rssParser = [[CXMLDocument alloc] initWithContentsOfURL:[NSURL URLWithString:url] options:0 error:nil];
NSLog(@"%@", rssParser);
but getting log im (null). The Loggin URL String gives me the correct URL without spaces or anything else, for example, the URL looks like this:
NSString *url = [NSString stringWithFormat:WEATHER_URL, [positionInformation objectForKey:@"stationId"]];
NSLog(@"%@", url);
Result in the debugger console
http:
viewing this file with my browser seems to be in order. Does anyone know what is going wrong ?????
I also tried first getting the contents of this url using stringWithContentsOfURL, but that didn't work either.