コード例 #1
0
ファイル: rss-news-search.c プロジェクト: azavadil/CS107_PA
static void PullAllNewsItems(urlconnection *urlconn, rssData *allData ) 
{
  streamtokenizer st;
  STNew(&st, urlconn->dataStream, kTextDelimiters, false);
  while (GetNextItemTag(&st)) { // if true is returned, then assume that <item ...> has just been read and pulled from the data stream
    ProcessSingleNewsItem(&st, allData );
  }
  
  STDispose(&st);
}
コード例 #2
0
ファイル: rss-news-search.c プロジェクト: mariolew/cs107
static void PullAllNewsItems(urlconnection *urlconn,  hashset *stopWords, hashset *prevSeenArticles, hashset *wordCounts)
{
  streamtokenizer st;
  STNew(&st, urlconn->dataStream, kTextDelimiters, false);
  while (GetNextItemTag(&st)) { // if true is returned, then assume that <item ...> has just been read and pulled from the data stream
      ProcessSingleNewsItem(&st, stopWords, prevSeenArticles, wordCounts);
  }
  
  STDispose(&st);
}