View Single Post
  #7 (permalink)  
Old 11-08-2007, 06:48 PM
made.putrama made.putrama is offline
Member
 
Join Date: Nov 2007
Location: Singapore
Posts: 3
made.putrama is on a distinguished road
Hi gvi,

try this code:
Code:
static void GetItem(Document doc){ Element root = doc.getDocumentElement(); NodeList items = root.getElementsByTagName("item"); for(int i=0;i<items.getLength();i++){ Element item = (Element)items.item(i); String id = item.getAttribute("id"); NodeList categs = item.getChildNodes(); for(int j=0;j<categs.getLength();j++){ Node categ = categs.item(j); if( categ instanceof Element){ Element el = (Element)categ; Text t = (Text)el.getFirstChild(); System.out.println(id+"|"+ t.getNodeValue() ); } } } }
Regards,
Putrama
__________________

To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.
Reply With Quote