Java and XML

Fuma

Executive Member
Joined
Jul 9, 2007
Messages
5,366
Reaction score
346
Location
Pretoria
Hi guys

I have a tricky XML/Java situation that I need some tips on
I have an XML file
<country>
<country-name code=”RSA”>
<city>JHB</city>
<city>Pretoria</city>
<city>Cape Town</city>
</country-name>

<country-name code=”Zim”>
<city>Harare</city>
<city>Mugabe’s other city</city>
<city>ZanuPF City</city>
</country-name>

</country >

Firstly I need to count how many cities per country. I know I have to get the parent and child nodes and so on
Secondly I need to display these cities names per country (if code =”RSA”)
 
Top
Sign up to the MyBroadband newsletter
X