-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(body) 是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 回答