Ruby:Read XML
From Progzoo
Read XML
The file http://progzoo.net/bbc.xml is as shown:
<world> <region id='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>
The REXML library allows an XPath expression such as //country to be used in place of the DOM methods "getElementsByTagName"
The value returned should be 82 million.
[Font]
[Default]
[Show]
[Resize]
[History]
[Profile]