Meaningless Drivel is fun!*
The moose likes XML and Related Technologies and the fly likes Iterating same level nodes Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of Murach's Java Servlets and JSP this week in the Servlets forum!
JavaRanch » Java Forums » Engineering » XML and Related Technologies
Bookmark "Iterating same level nodes" Watch "Iterating same level nodes" New topic

Iterating same level nodes

John Best

Joined: Oct 02, 2011
Posts: 9

Hi there,


how to iterate the above XML to get the Country's

Have a nice day
William Brogden
Author and all-around good cowpoke

Joined: Mar 22, 2000
Posts: 12759
You need to get familiar with the standard Java library for manipulating XML.

Given the "World" org.w3c.Dom.Eement, you can getElementsByTagName("Country") to get a NodeList which you can use to iterate.


subject: Iterating same level nodes
Similar Threads
Japan&#8217;s Love For Bicycle
14th and 15th Centuries - not the Darkest Ages
Do the Taliban smoke the opium too?
The fastest way to have peace on earth