26 |
StringBuilder builder = new StringBuilder(512); |
StringBuilder builder = new StringBuilder(512); |
27 |
|
|
28 |
@Override |
@Override |
29 |
public void lookupDepartures(String stationCode) { |
public void lookupDepartures(int stationID) { |
30 |
departures.clear(); |
departures.clear(); |
31 |
try |
try |
32 |
{ |
{ |
33 |
String url = "http://t-hoerup.dk/tog/xml_display.php?stationcode="+stationCode; |
//String url = "http://t-hoerup.dk/tog/xml_display.php?stationcode="+stationCode; |
34 |
|
String url = "http://app.t-hoerup.dk/TrainInfoService/DepartureServlet?format=xml&station=" + stationID; |
35 |
Log.i("xmlurl",url); |
Log.i("xmlurl",url); |
36 |
String doc = DownloadUtil.getContentString(url, 45000, "ISO-8859-1"); |
String doc = DownloadUtil.getContentString(url, 45000, "ISO-8859-1"); |
37 |
|
|
43 |
|
|
44 |
xr.setContentHandler(this); |
xr.setContentHandler(this); |
45 |
xr.setErrorHandler(this); |
xr.setErrorHandler(this); |
|
xr.setDTDHandler(this); |
|
46 |
xr.parse(source); |
xr.parse(source); |
47 |
} catch (Exception e) { |
} catch (Exception e) { |
48 |
Log.e("XmlDepartureProvider", "looupFunction", e); |
Log.e("XmlDepartureProvider", "looupFunction", e); |