/[projects]/android/TrainInfoService/src/dk/thoerup/traininfoservice/banedk/MetroFetcher.java
ViewVC logotype

Diff of /android/TrainInfoService/src/dk/thoerup/traininfoservice/banedk/MetroFetcher.java

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

revision 1055 by torben, Tue Sep 14 11:09:55 2010 UTC revision 1056 by torben, Tue Sep 14 17:01:24 2010 UTC
# Line 83  public class MetroFetcher { Line 83  public class MetroFetcher {
83                  for (int i=1; i<rows.size(); i++) {                  for (int i=1; i<rows.size(); i++) {
84                          Element row = rows.get(i);                                Element row = rows.get(i);      
85                          Elements fields = row.children();                          Elements fields = row.children();
86    
87                            
88                            
89                            Elements metroFields = fields.get(0).children();                        
90                            String metro ="";                      
91                            for (Element elm : metroFields) {
92                                    metro = metro + elm.text() + " ";
93                            }
94                            
95                            
96                                                    
                         String metro = fields.get(0).text();  
97                          String destination = fields.get(1).text();                          String destination = fields.get(1).text();
                         Elements minuteFields = fields.get(2).children();  
                         String minutes ="";  
98                                                    
99                            Elements minuteFields = fields.get(2).children();                      
100                            String minutes ="";                    
101                          for (Element elm : minuteFields) {                          for (Element elm : minuteFields) {
102                                  minutes = minutes + elm.text() + " ";                                  minutes = minutes + elm.text() + " ";
103                          }                          }
104                                                    
105                          MetroEntry entry = new MetroEntry();                          MetroEntry entry = new MetroEntry();
106                          entry.metro = metro;                          entry.metro = metro.trim();
107                          entry.destination = destination;                          entry.destination = destination.trim();
108                          entry.minutes = minutes;                          entry.minutes = minutes.trim();
109                                                    
110                          bean.entries.add(entry);                                                  bean.entries.add(entry);                        
111                  }                  }

Legend:
Removed from v.1055  
changed lines
  Added in v.1056

  ViewVC Help
Powered by ViewVC 1.1.20