Вопрос

In my XML,i need to find the element tag whether it exists or not using TBXML

Это было полезно?

Решение

enter code hereYou will check if element is non nill than it exists.. as

TBXMLElement *rootElement = [xml rootXMLElement];

TBXMLElement *yourTag = [TBXML childElementNamed:@"YourTagName" parentElement:rootElement];
if(yourTag)
   NSLog(@"This element exists");
else
   NSLog(@"This element does not exist");
Лицензировано под: CC-BY-SA с атрибуция
Не связан с StackOverflow
scroll top