ich hoffe ich könnt mir helfen. Mein Problem ist, dass ich es nicht schaffe, meine XML Datei von einer URL runterzuladen, um damit weiter zuarbeiten.
Mein Code:
onCreate():
Code:
XmlPullParserFactory factory = XmlPullParserFactory.newInstance();
XmlPullParser parser = factory.newPullParser();
InputStreamReader data = new InputStreamReader(getUrlData("http://localhost/Videos.xml"));
parser.setInput(data);
Code:
public InputStream getUrlData(String url) throws URISyntaxException, ClientProtocolException, IOException {
DefaultHttpClient client = new DefaultHttpClient();
HttpGet method = new HttpGet(new URI(url));
HttpResponse res = client.execute(method);
return res.getEntity().getContent();
}






