I was trying to read a xml file remotely but keep getting the java.net.SocketException: Permission denied exception. I tried the same thing within a normal java application and it works.
Here is the code:
try
{
URL url = new URL("http://rss.weather.com/rss/national/rss_nwf_rss.xml?cm_ven=NWF&cm_cat=rss&par=NWF_rss");
InputStream input = url.openStream();
}
catch(Exception e)
{
e.printStackTrace();
}
I was doing it in a Android Emulator, maybe that's the cause?
Thanks very much in advance for any replies.
Here is the code:
try
{
URL url = new URL("http://rss.weather.com/rss/national/rss_nwf_rss.xml?cm_ven=NWF&cm_cat=rss&par=NWF_rss");
InputStream input = url.openStream();
}
catch(Exception e)
{
e.printStackTrace();
}
I was doing it in a Android Emulator, maybe that's the cause?
Thanks very much in advance for any replies.