TBXML have valueOfAttributeNamed
method which is used to get attribute values and textForElement
method which is used to get element values.
So do like this.
if ([[TBXML elementName:objElement] isEqualToString:@"Object"])
{
NSLog(@"%@",[TBXML textForElement:objElement]) ;
}
instead of
[TBXML valueOfAttributeNamed:@"type" forElement:objElement]