user1005816
user1005816

Reputation: 11

UIImageView and NSXMLParser

I'm using XML to extract images. I've accomplished to parse the XML and according to the log files there should be nothing wrong with the parsing. How do I show those images? In the XML, they are stored as plain URLs with the tag image.

Upvotes: 0

Views: 112

Answers (1)

Aravindhan
Aravindhan

Reputation: 15628

Get the url from the image tag through parsing and then populate it in a tableview or some other view.

NSURL * imageURL = [NSURL URLWithString:@"http://yourImagename.jpg"];
NSData * imageData = [NSData dataWithContentsOfURL:imageURL];
UIImage * urlImage = [UIImage imageWithData:imageData]; 
myImageView.urlImage = image;

Upvotes: 1

Related Questions