Skip to content
/ iFeed Public

iFeed - Rss, Atom parser in native browser with webworker

Notifications You must be signed in to change notification settings

iwege/iFeed

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

37 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

iFeed - RSS, Atom feed parsing in browser with webworker.


Thanks

The feedparser.js has contain all of them, I remove the parseUrl, parseFile from feedparser for native browser env;

Usage

iFeed(xml_string, function callback(feed){
	//do something with feed/
});

Notice: the input type MUST BE String !! So if you use ajax with jquery, you need to set the dataType to TEXT.

AND if you don't want to use the feed content format which I used ,you can overwrite the format function in your script. But notice if you want to use it in webworker. you need use importScripts to add your script in the end of ifeed.js like:

if(isWorker){ importScript('yourscript1.js','yourscript2.js')}

No WebWorker

if you want use it without webworker, you need to put feedparser.js and ifeed.js in document.

<script src="feedparser.js"></script>
<script src="ifeed.js"></script>

WebWorker

  1. Use workerWrapper.js to load iFeed:
<script src="workerWrapper.js" ></script>
  1. start worker with startWorker function,set the iFeed.js' path and the number how many workers you want to use, the default number is 10;
startWorker(/*iFeed.js' src[,max worker you want] */);

The Number of webworker isn't the more the better, if you set too big , the browser will be crashed.

License

Copyright (C) 2011 iwege - http://iwege.com

Licensed under the MIT (MIT-license.txt) .

About

iFeed - Rss, Atom parser in native browser with webworker

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published