It just keep giving me "Permission denied" error.
Here's my code.
Here's my code.
Code:
private RSSFeed getFeed(String urlToRssFeed)
{
URL url=null;
try
{
// setup the url
url = new URL(urlToRssFeed);
// create the factory
SAXParserFactory factory = SAXParserFactory.newInstance();
// create a parser
SAXParser parser = factory.newSAXParser();
// create the reader (scanner)
XMLReader xmlreader = parser.getXMLReader();
// instantiate our handler
RSSHandler theRssHandler = new RSSHandler();
// assign our handler
xmlreader.setContentHandler(theRssHandler);
// get our data through the url class
xmlreader.parse(new InputSource(url.openStream()));
// get the results - should be a fully populated RSSFeed instance,
// or null on error
return theRssHandler.getFeed();
}
catch (Exception ee)
{
// if you have a problem, simply return null
new AlertDialog.Builder(this)
.setMessage(ee.getMessage()).show();
return null;
}
}