hello guys.
i want make a script that reads some info from a xml file.
the xml file looks like this:

<DataSet xsi:schemaLocation="http://www.bnr.ro/xsd nbrfxrates.xsd">
&#8722;
<Header>
<Sender>National Bank of Romania</Sender>
<SendingDate>2008-12-08</SendingDate>
<MessageType>DR</MessageType>
</Header>
&#8722;
<Body>
<Subject>Reference rates</Subject>
<OrigCurrency>RON</OrigCurrency>
&#8722;
<Cube date="2008-12-08">
<Rate currency="AUD">1.9894</Rate>
<Rate currency="BGN">1.9722</Rate>
<Rate currency="CAD">2.3992</Rate>
<Rate currency="CHF">2.4727</Rate>
<Rate currency="CZK">0.1503</Rate>
<Rate currency="DKK">0.5178</Rate>
<Rate currency="EGP">0.5424</Rate>
<Rate currency="EUR">3.8573</Rate>
<Rate currency="GBP">4.4650</Rate>
<Rate currency="HUF" multiplier="100">1.4580</Rate>
<Rate currency="JPY" multiplier="100">3.2137</Rate>
<Rate currency="MDL">0.2925</Rate>
<Rate currency="NOK">0.4230</Rate>
<Rate currency="PLN">0.9950</Rate>
<Rate currency="RUB">0.1071</Rate>
<Rate currency="SEK">0.3677</Rate>
<Rate currency="SKK">0.1278</Rate>
<Rate currency="TRY">1.9084</Rate>
<Rate currency="USD">2.9961</Rate>
<Rate currency="XAU">74.3619</Rate>
<Rate currency="XDR">4.5202</Rate>
</Cube>
</Body>
</DataSet>

i need to read the value from : <Rate currency="EUR">3.8573</Rate> as a number and the value from <Rate currency="USD">2.9961</Rate>.

thx.

also if u know any tutorials for this kind of things post it right here pls.

    Write a Reply...