12 |
import org.w3c.dom.Document; |
import org.w3c.dom.Document; |
13 |
import org.w3c.dom.Node; |
import org.w3c.dom.Node; |
14 |
import org.w3c.dom.NodeList; |
import org.w3c.dom.NodeList; |
|
import org.w3c.dom.Text; |
|
15 |
import org.xml.sax.SAXException; |
import org.xml.sax.SAXException; |
16 |
|
|
17 |
import android.location.Location; |
import android.location.Location; |
38 |
try { |
try { |
39 |
stations.clear(); |
stations.clear(); |
40 |
|
|
41 |
String xml = DownloadUtil.getContentString(url, 15000); |
String xml = DownloadUtil.getContentString(url, 15000, "ISO-8859-1"); |
42 |
|
|
43 |
|
|
44 |
Document doc = parseXML(xml); |
Document doc = parseXML(xml); |
66 |
|
|
67 |
Log.i("XML", "" + nodeName + "=" + content); |
Log.i("XML", "" + nodeName + "=" + content); |
68 |
|
|
69 |
|
if (nodeName.equals("id")) |
70 |
|
station.setId( Integer.parseInt(content)); |
71 |
|
|
72 |
if (nodeName.equals("name")) |
if (nodeName.equals("name")) |
73 |
station.setName(content); |
station.setName(content); |
74 |
|
|