对于新手问题,我很抱歉。我已经为此工作了几天,但我遇到了理解问题。我使用 sudzc 帮助连接到我的 Web 服务。示例函数仅返回 1 个结果(最后一个)。如何将所有结果加载到数组中,以便找到 CSHR_NUM = 8?我不确定是否有问题: - (void) GetCashiersHandler: (id) value
任何帮助将不胜感激!
sudzc 日志记录返回(有数百个条目,我将其删除):
<TC diffgr:id="TC1" msdata:rowOrder="0">
<CSHR_POS_NAME>JACKSON<CSHR_POS_NAME />
<CSHR_NUM>8</CSHR_NUM>
</TC>
<TC diffgr:id="TC2" msdata:rowOrder="1">
<CSHR_POS_NAME>ALISON</CSHR_POS_NAME>
<CSHR_NUM>464</CSHR_NUM>
</TC>
我使用调用的示例方法:
[服务 GetCashiers:self action:@selector(GetCashiersHandler];
// Handle the response from GetCashiers to get login in name.
- (void) GetCashiersHandler: (id) value
{
// Do something with the CXMLNode* result
CXMLNode *result = (CXMLNode*)value;
NSLog(@"I returned the value: %@", result);
}
NSLog 结果:
I returned the value: {
GetCashiersResult = {
diffgram = {
NewDataSet = {
TC = {
"CSHR_NUM" = 464;
"CSHR_POS_NAME" = ALLISON;
};
};
};
schema = {
element = {
complexType = {
choice = {
element = {
complexType = {
sequence = {
element = 0;
};
};
};
};
};
};
};
};
}