Here is my link i want to extract the youtube videos out from the html at this URL
http://gdata.youtube.com/feeds/api/users/mizzoushape/uploads?orderby=updated
$<link rel ='alternate' href='somelink.html'/>$
Can any one help me out how to fetch the attributes inside the tag..
Thanks in advance for your va开发者_JAVA技巧luable time
If you are parsing XML File Then:
In the parser:didStartElement method, the attributes are stored in the attributeDict dictionary. The values are then stores with the attribute name as the key
- (void)parser:(NSXMLParser *)parser didStartElement:(NSString *)elementName namespaceURI:(NSString *)namespaceURI qualifiedName:(NSString *)qualifiedName attributes:(NSDictionary *)attributeDict{
// Here you can get value from "attributeDict" by key for example
NSString *strHref = [attributeDict objectForKey:@"href"];
}
精彩评论