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”)
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”)