【发布时间】:2019-03-05 17:48:28
【问题描述】:
您好,我正在尝试在 Android 上解析一些原始 XML 数据,然后我想在地图上绘制地震图,但首先我无法显示纬度和经度……其次,我不知道如何绘制这个安卓中的谷歌地图
这是我的一些代码
[// extract the text between <link> and </link>
links.add(xpp.nextText());
}
}
else if(xpp.getName().equalsIgnoreCase("geo:lat")){
if(insideItem){
//extract the text between <geo:lat> and </geo:lat>
lat.add(Double.valueOf(xpp.nextText()));
}
}
else if(xpp.getName().equalsIgnoreCase("geo:long")){
if(insideItem) {
//extract the text between <geo:lat> and </geo:lat>
lon.add(Double.valueOf(xpp.nextText()));;
} }
}
//if we are at an END_TAG and the END_TAG is called "item"
else if (eventType == XmlPullParser.END_TAG && xpp.getName().equalsIgnoreCase("item"))][1]
【问题讨论】:
标签: android xml-parsing