I made a SAX parser that accepts an InputStream as file to parse. If I use a local file it works, but if I try to get it from the internet it crashes when it opens the Input Stream.
There is the code:
URL url = new URL(http://www.myDomain.com/xml/device.xml);
URLConnection connection = url.openConnection();
InputStream inStream = connection.getInputStream();
...
parser.parse(inStream, handler);
I have been trying it in several ways I have seen in other questions and it always crashes at InputStream inStream = connection.getInputStream();
or similar.
Thanks in advance.