-1

私は次のコードを持っています

 DownloadOperations *DataObj=[[DownloadOperations alloc]init];
[DataObj ID];

NSString *body=[NSString stringWithFormat:@"<?xml version='1.0' encoding='utf-8'?><soap:Envelope xmlns:xsi='http://www.w3.org/2001/XMLSchema-instance' xmlns:xsd='http://www.w3.org/2001/XMLSchema' xmlns:soap='http://schemas.xmlsoap.org/soap/envelope/'><soap:Body><GetDocumentUpdatedInfo xmlns='http://tempuri.org/'><DocumentID>%@</DocumentID></GetDocumentUpdatedInfo></soap:Body></soap:Envelope>", [DataObj ID]];
NSLog(@"Body %@", body);

このコード[DataObj ID]の はNsMutablearrayで、NSString(本体) は値soap Requestを必要とするstringです。soap requestの各要素に対してこれを繰り返し実行するにはどうすればよいarrayですか?

4

1 に答える 1

1
int loopCount = 0;
while (loopCount < [[DataObj ID] count]){
    //Do stuff with [[DataObj ID] objectAtIndex:loopCount]
    loopCount++;
}
于 2013-05-22T21:35:37.280 に答える