Getting List of Exchange Rates

by Feb 22, 2011

In a previous tip, you learned how to read current exchange rates from the Internet., you can easily create a comprehensive list of all exchange rates by using a hash table:

$xml = New-Object xml

$allrates = @{}
$xml.Envelope.Cube.Cube.Cube | ForEach-Object {
$currency = $_.currency
$rate = $_.rate
$allrates.$currency = $rate
"All exchange rates:"
"Specific exchange rate:"

Twitter This Tip!
ReTweet this Tip!