Android - KML Parser using DOM Parser

betahing

New Member
i've a problem here.i wanna parsing a KML document from google maps. i'd successfuly to parsing the nodes which stores a coordinate.but i wanna parse the node as childnodes here is the KML documents.\[code\]<Placemark><name>Head north on Jalan Kebagusan Raya toward Jalan Anggrek</name><description><![CDATA[go 850 m]]></description><address>Jalan Kebagusan Raya</address>...</Placemark\[/code\]to parse it i used this code, \[code\]NodeList nlPlace = doc.getElementsByTagName("Placemark"); for(int p = 0; p < nlPlace.getLength(); p++){ Node rootPlace = nlPlace.item(p); NodeList itemPlace = rootPlace.getChildNodes(); for(int y = 0; y < itemPlace.getLength(); y++){ Node placeStringNode = itemPlace.item(y); NodeList place = placeStringNode.getChildNodes(); //valueName = nameList.item(0).getNodeValue().toString() + "+"; pathName.add(place.item(0).getNodeValue()); } }desk.setText(""); for (int j = 0; j < strPlace.length; j++){ desk.append("Deskripsi:\n" + strPlace[j] + "\n"); }\[/code\]but when i tried in a real device/emulator, i got something i dont want to.this is the screenshot from my real device
rilep.jpg
from the scrshot, i just want to grab the "Head northeast on Jalan Darmo Kali toward Jalan Darmoerjo 4" informations. just it. can u help me to solve my problems?thanks in advance, and sorry for my english, thanks :)
 
Back
Top