Created
March 19, 2013 21:07
-
-
Save robhinds/5200144 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@Override | |
protected List<Article> doInBackground(String... urls) { | |
String feed = urls[0]; | |
URL url = null; | |
try { | |
SAXParserFactory spf = SAXParserFactory.newInstance(); | |
SAXParser sp = spf.newSAXParser(); | |
XMLReader xr = sp.getXMLReader(); | |
url = new URL(feed); | |
RssHandler rh = new RssHandler(); | |
xr.setContentHandler(rh); | |
xr.parse(new InputSource(url.openStream())); | |
... |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment