hi,
I am having problem with loading the dataset...
I download the dataset from url and write it to the Documents Dir
as follows:
the xml file,
NSArray *paths = NSSearchPathForDirectoriesInDomains(NSDocumentDirectory,NSUserDomainMask, YES); NSString *documentsDir = [paths objectAtIndex:0]; NSString *filePathxml = @"http://../../../tracker/tracker.xml"; NSData *dataxml = [NSData dataWithContentsOfURL:[NSURL URLWithString:filePathxml]]; [dataxml writeToFile:[NSString stringWithFormat:@"%@/tracker.xml",documentsDir] atomically:YES];
and the dat file, here the trackerdat.xml is actually a tracker.dat file which is just renamed so that i can download it..
NSString *filePathdat = @"http://../../../tracker/trackerdat.xml"; NSData *datadat = [NSData dataWithContentsOfURL:[NSURL URLWithString:filePathdat]]; [datadat writeToFile:[NSString stringWithFormat:@"%@/tracker.dat",documentsDir] atomically:YES];
I can see both tracker.xml and tracker.dat file in organiser in doc dir.
but while loading the dataset in the - (BOOL)loadDataSet:(NSString *)dataSetPath method it does no loads the dataset, giving...
Failed to load data set. in here
QCARutils: Failed to load target
it was loading the dataset earlier when i had done the same thing... but now its just not loading the dataset which i download from server in docs dir.. please help..
Sorry, just noticed you've done 2) using the original non-downloaded files.
So it looks like you need to compare the contents of the files (and see what actually is inside the downloaded ones).
As a wild shot, because your .dat file is being referenced as an xml it is possible that something tries to do some manipulation of it along the line.