// Define the XML Document NSXMLDocument* doc = [[NSXMLDocument alloc] initWithXMLString:[NSString stringWithContentsOfFile:@"/folder/with/sample.xml"]]; // Create the arrays here NSMutableArray* objects = [[NSMutableArray alloc] initWithCapacity:10]; NSMutableArray* descriptions = [[NSMutableArray alloc] initWithCapacity:10]; NSXMLDocument* doc = [[NSXMLDocument alloc] init...]; NSXMLElement* root = [doc rootElement]; NSArray* objectElements = [root nodesForXPath:@"//object" error:nil]; for(NSXMLElement* xmlElement in objectElements) [objects addObject:[xmlElement stringValue]]; NSArray* descElements = [root nodesForXPath:@"//description" error:nil]; for(NSXMLElement* xmlElement in descElements) [descriptions addObject:[xmlElement stringValue]]; [doc release]; [objects release]; [descriptions release];