嗨我正在与下面的XML是我的xml从服务器。如何检查xml标签字符串?
<message xmlns="jabber:client" to="[email protected]" id="A2EFL-1435" from="[email protected]"><x xmlns="jabber:x:event"><composing/><id>A2EFL-1434</id></x></message>
现在我需要检查是否有composing
元素或XML not.And我没有使用任何XML代表。有没有使用委托方法用于XML
NSXMLElement *events = [message elementForName:@"x"];
NSString *eventString=[[message elementForName:@"x"] stringValue];
if (![eventString isEqualToString:@""]) {
NSString *composingString=[[events elementForName:@"composing"] stringValue];
if ([composingString isEqualToString:@""]||[composingString isEqualToString:@"nil"]) {}
任何可能性,但我需要检查XML标签不珍惜
但如何检查标签等于“作曲”字符串我对每个XML名称不同 – Bittoo
是正是我对每个XML性反应的不同的字符串,我需要检查字符串 – Bittoo
如何将'NSXMLElement转换'到'NSString'。 – Bittoo