Xml'den bilgi almak

try

{

ByteArrayInputStream sonucIS=new ByteArrayInputStream(sonuc.getBytes);

DocumentBuilderFactory dbf=DocumentBuilderFactory.newInstance;

DocumentBuilder db=dbf.newDocumentBuilder;

Document dom=db.parse(sonucIS);

Element docEle=dom.getDocumentElement;

NodeList nl=docEle.getElementsByTagName("tag");

if(nl!=null && nl.getLength>0)

{

for(int i=0;i<nl.getLength;i++)

{

Element entry=(Element)nl.item(i);

String bilgi=entry.getFirstChild.getNodeValue;

}

}

}

catch (IOException e)

{

e.printStackTrace;

}

catch (ParserConfigurationException e)

{

e.printStackTrace;

}

catch (SAXException e)

{

e.printStackTrace;

}