Quantcast
Channel: NSXML parsing error when used with NSData - Stack Overflow
Viewing all articles
Browse latest Browse all 2

NSXML parsing error when used with NSData

$
0
0

I have a simple XML file containing a subset list of products. When I load the file from the iOS App bundle and send it through the parser with: initWithNSURL, with an NSURL pointing to the local file it parses correctly.

However if I download the same file via an NSURLConnection and pass it to the parser with initWithData, the parsing fails. I can confirm the data is being downloaded correctly because if I perform NSString *temp = [NSString stringWithUTF8String:[downloadedData bytes]]; the outputted string is correct. I have a guy feeling it's sometime to do with encoding somewhere along the line, any thoughts?


Viewing all articles
Browse latest Browse all 2

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>