문제

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