Forum Navigation
You need to log in to create posts and topics.

How read PLIST into NSArray?

Posted by: artlythere <artlythere@...>

Can anyone point out how I can read an XML PLIST data object into an NSArray?

NSArray * archiveArray = [NSArray arrayWithObject:(NSData *)xmlData];

arrayCount = [archiveArray count];

NSLog(@"My Array Count = %i", arrayCount);

Well, gives 1, as you'd expect, I guess...since there's one object, xmlData, though it has kazillions in the PLIST itself.

Is there anything which will automagically put the dang thing into the array already sorted, and elemented? To where I can then extract the image data?

NSDictionary?

This is from a Safari Web Archive, read from disk, saved out as XML (or in this case, just read into an array, I don't need to save it first, do I?

(Safari archives are in binary, I convert to XML...)

rc