/[projects]/android/TrainInfo/src/dk/thoerup/traininfo/provider/XmlDepartureProvider.java
ViewVC logotype

Diff of /android/TrainInfo/src/dk/thoerup/traininfo/provider/XmlDepartureProvider.java

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 294 by torben, Tue Sep 1 20:28:55 2009 UTC revision 315 by torben, Fri Sep 11 08:34:57 2009 UTC
# Line 26  public class XmlDepartureProvider extend Line 26  public class XmlDepartureProvider extend
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                                                    
# Line 42  public class XmlDepartureProvider extend Line 43  public class XmlDepartureProvider extend
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);

Legend:
Removed from v.294  
changed lines
  Added in v.315

  ViewVC Help
Powered by ViewVC 1.1.20