开发者

Using NSXMLParser to get the First <created_at> entry to display the date of a Tweet

开发者 https://www.devze.com 2023-03-12 17:37 出处:网络
I have my nsxmlparser that parsers the xml from twitter correctly, but i am having problems trying to get the date the tweet was posted.

I have my nsxmlparser that parsers the xml from twitter correctly, but i am having problems trying to get the date the tweet was posted.

if([elementName isEqualToString:@"created_at"])
    {
        currentTweet.dateEnteredRss = currentNodeContent;
    } 

This picks up t开发者_StackOverflowhe date the account was created but not the tweet date

Has anyone else encountered this problem and has a solution?

Thanks


Is dateEnteredRss an NSDate type? If so, you might want to use an NSDateFormatter to convert the string that your xml is reading into a date format.

0

精彩评论

暂无评论...
验证码 换一张
取 消