- (void)viewDidLoad { TBXML * tbxml = [[TBXML tbxmlWithURL:[NSURL URLWithString:@"http://localhost/dev/mcomm/produto.xml"]] retain]; TBXMLElement * rootXMLElement = tbxml.rootXMLElement; } TBXML *tbxml = nil; @try { tbxml = [[TBXML tbxmlWithURL:[NSURL URLWithString:@"http://localhost/dev/mcomm/produto.xml"]] retain];; } @catch (NSException *exception) { NSLog(@"Caught %@: %@", [exception name], [exception reason]); } TBXMLElement * xmlElement = aParentXMLElement->firstChild; if (aParentXMLElement != nil) { TBXMLElement * xmlElement = aParentXMLElement->firstChild; } else { NSLog(@"Can't proceed: aParentXMLElement is nil"); }