This is my error:
--> E/XML error(989): Error: expected: /link read: head (position:END_TAG @49:8 in java.io.InputStreamReader@537f609c)
I am reading a xml - file with ISO 8859-1 encoding.
But it's impossible. In other encodings if that is posible, for example UTF -8 , ISO- 8859-15, but not with ISO 8859-1.
URL url = new URL(MYLINK)
InputStream mi;
HttpURLConnection connection = (HttpURLConnection) url
.openConnection();
connection.setReadTimeout(10 * 1000);
connection.setConnectTimeout(10 * 1000);
connection.setRequestMethod("GET");
connection.setDoInput(true);
connection.connect();
int response = connection.getResponseCode();
Log.d("debug", "The response is: " + response);
mi = connection.getInputStream();
XmlPullParser xpp = factory.newPullParser();
xpp.setInput(mi, "ISO-8859-1");
....