--- android/TrainInfo/src/dk/thoerup/traininfo/provider/XmlStationProvider.java 2009/09/11 11:51:57 318 +++ android/TrainInfo/src/dk/thoerup/traininfo/provider/XmlStationProvider.java 2009/09/11 12:24:53 319 @@ -30,8 +30,8 @@ } @Override - public void lookupStations(Location location) { - + public boolean lookupStations(Location location) { + boolean success = false; String url = "http://app.t-hoerup.dk/TrainInfoService/LocateStations?latitude=" + location.getLatitude() + "&longitude=" + location.getLongitude(); Log.i("url", url); try { @@ -83,15 +83,17 @@ } stations.add(station); - } + } + success = true; } catch (Exception e) { Log.e("XmlStationProvider", "lookupStations: ", e); } + return success; } - public Document parseXML(String str) throws SAXException, IOException, ParserConfigurationException + private Document parseXML(String str) throws SAXException, IOException, ParserConfigurationException { DocumentBuilder builder = DocumentBuilderFactory.newInstance().newDocumentBuilder(); return builder.parse( new ByteArrayInputStream(str.getBytes()) );