C#:Looping over DOM Tutorial

From Progzoo
Revision as of 21:20, 30 May 2008 by 92.235.175.0 (Talk) (GetElementById)

Jump to: navigation, search
The file http://progzoo.net/world.xml is as shown:
<world>
 <region name='Europe'>
  <country id='de' name='Germany' pop='82000000'/>
  <country id='fr' name='France'  pop='60000000'/>
  ...
 </region>
 <region id='Asia'>
  <country id='cn' name='China' pop='1300000000'/>
   ...
 </region>
 ...
</world>

This this tutorial we look at the following members of the DOM interface

NodeList

GetElementsByTagName

The program shown uses GetElementById.

Change the program so that it prints the name of the country with id "ca".


[Font] [Default] [Show] [Resize] [History] [Profile]