473,513 Members | 2,693 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

XML with no ID

Hi . My problem is that I have XML provided to me by URL but there are
no ID tags. How do I loop through and find a specific value in the XML?
The site I'm working on uses classic ASP. Here is my code and the xml
that is returned by the URL

<%'--------------------------------------%>
URL = "http://www.forex.se/ratesxml.asp?id=269"
set xmlhttp = CreateObject("Microsoft.XMLHTTP")
xmlhttp.open "GET", URL, false
xmlhttp.send ""
result = xmlhttp.responseText
Response.Write result
<%'------------- so far so good.---%>

here my problems start. I usually use getElementsByTagName but it just
won't work here since the xml doesn't seem to have ID's. How do I do to
for example get the value of EUR for SEK in the file? The entire
response XML is pasted bellow .

Set xmlDoc = CreateObject("Microsoft.xmldom")
xmlDoc.async = False
xmlDoc.loadXML(result)
'what to do....

Thank you!

<?xml version="1.0" encoding="iso-8859-1"?><web_dis_rates><timestamp
Desc="Senast uppdaterad:">2006-03-17
17:00</timestamp><row><swift_code>AED</swift_code><swift_name>arabiska
Dirham</swift_name><multiply>1</multiply><buy_cash>2,0414</buy_cash><buy_tc>-</buy_tc><sell_cash>2,2121</sell_cash><sell_tc>-</sell_tc><CurrencyGuide
BaseSwift="SEK" Swift="AED"
Amount="100">45,21</CurrencyGuide><base_swift>SEK</base_swift></row><row><swift_code>AUD</swift_code><swift_name>australienska
Dollar</swift_name><multiply>1</multiply><buy_cash>5,5315</buy_cash><buy_tc>5,4762</buy_tc><sell_cash>5,8362</sell_cash><sell_tc>5,8362</sell_tc><CurrencyGuide
BaseSwift="SEK" Swift="AUD"
Amount="100">17,13</CurrencyGuide><base_swift>SEK</base_swift></row><row><swift_code>BBD</swift_code><swift_name>Barbados
Dollar</swift_name><multiply>1</multiply><buy_cash>3,7838</buy_cash><buy_tc>-</buy_tc><sell_cash>4,1495</sell_cash><sell_tc>-</sell_tc><CurrencyGuide
BaseSwift="SEK" Swift="BBD"
Amount="100">24,10</CurrencyGuide><base_swift>SEK</base_swift></row><row><swift_code>BGN</swift_code><swift_name>bulgariska
Lev
(New)</swift_name><multiply>1</multiply><buy_cash>4,6278</buy_cash><buy_tc>-</buy_tc><sell_cash>4,9464</sell_cash><sell_tc>-</sell_tc><CurrencyGuide
BaseSwift="SEK" Swift="BGN"
Amount="100">20,22</CurrencyGuide><base_swift>SEK</base_swift></row><row><swift_code>BHD</swift_code><swift_name>Dinar</swift_name><multiply>1</multiply><buy_cash>18,6681</buy_cash><buy_tc>-</buy_tc><sell_cash>21,3382</sell_cash><sell_tc>-</sell_tc><CurrencyGuide
BaseSwift="SEK" Swift="BHD"
Amount="100">4,69</CurrencyGuide><base_swift>SEK</base_swift></row><row><swift_code>BRL</swift_code><swift_name>Brasilianska
Real</swift_name><multiply>1</multiply><buy_cash>3,5995</buy_cash><buy_tc>-</buy_tc><sell_cash>3,9242</sell_cash><sell_tc>-</sell_tc><CurrencyGuide
BaseSwift="SEK" Swift="BRL"
Amount="100">25,48</CurrencyGuide><base_swift>SEK</base_swift></row><row><swift_code>BSD</swift_code><swift_name>Bahamas
Dollar</swift_name><multiply>1</multiply><buy_cash>7,4055</buy_cash><buy_tc>-</buy_tc><sell_cash>8,1624</sell_cash><sell_tc>-</sell_tc><CurrencyGuide
BaseSwift="SEK" Swift="BSD"
Amount="100">12,25</CurrencyGuide><base_swift>SEK</base_swift></row><row><swift_code>CAD</swift_code><swift_name>Kanadensiska
Dollar</swift_name><multiply>1</multiply><buy_cash>6,571</buy_cash><buy_tc>6,5052</buy_tc><sell_cash>6,775</sell_cash><sell_tc>6,775</sell_tc><CurrencyGuide
BaseSwift="SEK" Swift="CAD"
Amount="100">14,76</CurrencyGuide><base_swift>SEK</base_swift></row><row><swift_code>CHF</swift_code><swift_name>Schweiziska
Francs</swift_name><multiply>1</multiply><buy_cash>5,8713</buy_cash><buy_tc>5,8126</buy_tc><sell_cash>6,0208</sell_cash><sell_tc>6,0208</sell_tc><CurrencyGuide
BaseSwift="SEK" Swift="CHF"
Amount="100">16,61</CurrencyGuide><base_swift>SEK</base_swift></row><row><swift_code>CLP</swift_code><swift_name>Chilenska
Peso</swift_name><multiply>1</multiply><buy_cash>0,0142</buy_cash><buy_tc>-</buy_tc><sell_cash>0,0158</sell_cash><sell_tc>-</sell_tc><CurrencyGuide
BaseSwift="SEK" Swift="CLP"
Amount="100">6?329,11</CurrencyGuide><base_swift>SEK</base_swift></row><row><swift_code>CNY</swift_code><swift_name>kinesiska
Yuan</swift_name><multiply>1</multiply><buy_cash>0,9267</buy_cash><buy_tc>-</buy_tc><sell_cash>1,0049</sell_cash><sell_tc>-</sell_tc><CurrencyGuide
BaseSwift="SEK" Swift="CNY"
Amount="100">99,51</CurrencyGuide><base_swift>SEK</base_swift></row><row><swift_code>CYP</swift_code><swift_name>cypriotiska
Pund</swift_name><multiply>1</multiply><buy_cash>16,0905</buy_cash><buy_tc>15,9296</buy_tc><sell_cash>16,6466</sell_cash><sell_tc>-</sell_tc><CurrencyGuide
BaseSwift="SEK" Swift="CYP"
Amount="100">6,01</CurrencyGuide><base_swift>SEK</base_swift></row><row><swift_code>CZK</swift_code><swift_name>tjeckiska
Koruna</swift_name><multiply>1</multiply><buy_cash>0,3199</buy_cash><buy_tc>-</buy_tc><sell_cash>0,3394</sell_cash><sell_tc>-</sell_tc><CurrencyGuide
BaseSwift="SEK" Swift="CZK"
Amount="100">294,64</CurrencyGuide><base_swift>SEK</base_swift></row><row><swift_code>DKK</swift_code><swift_name>danska
Kronor</swift_name><multiply>1</multiply><buy_cash>1,236</buy_cash><buy_tc>-</buy_tc><sell_cash>1,267</sell_cash><sell_tc>-</sell_tc><CurrencyGuide
BaseSwift="SEK" Swift="DKK"
Amount="100">78,93</CurrencyGuide><base_swift>SEK</base_swift></row><row><swift_code>DOP</swift_code><swift_name>Dominikanska
Peso
Oro</swift_name><multiply>1</multiply><buy_cash>0,2161</buy_cash><buy_tc>-</buy_tc><sell_cash>0,255</sell_cash><sell_tc>-</sell_tc><CurrencyGuide
BaseSwift="SEK" Swift="DOP"
Amount="100">392,16</CurrencyGuide><base_swift>SEK</base_swift></row><row><swift_code>EEK</swift_code><swift_name>estniska
Kroon</swift_name><multiply>1</multiply><buy_cash>0,582</buy_cash><buy_tc>-</buy_tc><sell_cash>0,6126</sell_cash><sell_tc>-</sell_tc><CurrencyGuide
BaseSwift="SEK" Swift="EEK"
Amount="100">163,24</CurrencyGuide><base_swift>SEK</base_swift></row><row><swift_code>EGP</swift_code><swift_name>egyptiska
Pund</swift_name><multiply>1</multiply><buy_cash>1,2892</buy_cash><buy_tc>-</buy_tc><sell_cash>1,436</sell_cash><sell_tc>-</sell_tc><CurrencyGuide
BaseSwift="SEK" Swift="EGP"
Amount="100">69,64</CurrencyGuide><base_swift>SEK</base_swift></row><row><swift_code>EUR</swift_code><swift_name>Euro</swift_name><multiply>1</multiply><buy_cash>9,2486</buy_cash><buy_tc>9,1561</buy_tc><sell_cash>9,5274</sell_cash><sell_tc>9,5274</sell_tc><CurrencyGuide
BaseSwift="SEK" Swift="EUR"
Amount="100">10,50</CurrencyGuide><base_swift>SEK</base_swift></row><row><swift_code>FJD</swift_code><swift_name>Fiji
Dollar</swift_name><multiply>1</multiply><buy_cash>4,0337</buy_cash><buy_tc>-</buy_tc><sell_cash>4,7045</sell_cash><sell_tc>-</sell_tc><CurrencyGuide
BaseSwift="SEK" Swift="FJD"
Amount="100">21,26</CurrencyGuide><base_swift>SEK</base_swift></row><row><swift_code>GBP</swift_code><swift_name>engelska
Pund</swift_name><multiply>1</multiply><buy_cash>13,3165</buy_cash><buy_tc>13,1834</buy_tc><sell_cash>13,7335</sell_cash><sell_tc>13,7335</sell_tc><CurrencyGuide
BaseSwift="SEK" Swift="GBP"
Amount="100">7,28</CurrencyGuide><base_swift>SEK</base_swift></row><row><swift_code>GMD</swift_code><swift_name>Gambianska
Dalasi</swift_name><multiply>1</multiply><buy_cash>0,2488</buy_cash><buy_tc>-</buy_tc><sell_cash>0,2936</sell_cash><sell_tc>-</sell_tc><CurrencyGuide
BaseSwift="SEK" Swift="GMD"
Amount="100">340,60</CurrencyGuide><base_swift>SEK</base_swift></row><row><swift_code>HKD</swift_code><swift_name>Hongkong
Dollar</swift_name><multiply>1</multiply><buy_cash>0,9507</buy_cash><buy_tc>-</buy_tc><sell_cash>1,0375</sell_cash><sell_tc>-</sell_tc><CurrencyGuide
BaseSwift="SEK" Swift="HKD"
Amount="100">96,39</CurrencyGuide><base_swift>SEK</base_swift></row><row><swift_code>HRK</swift_code><swift_name>kroatiska
Kuna</swift_name><multiply>1</multiply><buy_cash>1,2611</buy_cash><buy_tc>-</buy_tc><sell_cash>1,3381</sell_cash><sell_tc>-</sell_tc><CurrencyGuide
BaseSwift="SEK" Swift="HRK"
Amount="100">74,73</CurrencyGuide><base_swift>SEK</base_swift></row><row><swift_code>HUF</swift_code><swift_name>ungerska
Forint</swift_name><multiply>1</multiply><buy_cash>0,0351</buy_cash><buy_tc>-</buy_tc><sell_cash>0,0375</sell_cash><sell_tc>-</sell_tc><CurrencyGuide
BaseSwift="SEK" Swift="HUF"
Amount="100">2?666,67</CurrencyGuide><base_swift>SEK</base_swift></row><row><swift_code>IDR</swift_code><swift_name>indonesiska
Rupiah</swift_name><multiply>100</multiply><buy_cash>0,0776</buy_cash><buy_tc>-</buy_tc><sell_cash>0,0901</sell_cash><sell_tc>-</sell_tc><CurrencyGuide
BaseSwift="SEK" Swift="IDR"
Amount="100">110?987,79</CurrencyGuide><base_swift>SEK</base_swift></row><row><swift_code>ILS</swift_code><swift_name>israeliska
NewSheqel</swift_name><multiply>1</multiply><buy_cash>1,5553</buy_cash><buy_tc>-</buy_tc><sell_cash>1,7459</sell_cash><sell_tc>-</sell_tc><CurrencyGuide
BaseSwift="SEK" Swift="ILS"
Amount="100">57,28</CurrencyGuide><base_swift>SEK</base_swift></row><row><swift_code>INR</swift_code><swift_name>indiska
Rupee</swift_name><multiply>1</multiply><buy_cash>0,1637</buy_cash><buy_tc>-</buy_tc><sell_cash>0,1866</sell_cash><sell_tc>-</sell_tc><CurrencyGuide
BaseSwift="SEK" Swift="INR"
Amount="100">535,91</CurrencyGuide><base_swift>SEK</base_swift></row><row><swift_code>ISK</swift_code><swift_name>isl?ska
Kr?</swift_name><multiply>1</multiply><buy_cash>0,1064</buy_cash><buy_tc>-</buy_tc><sell_cash>0,1152</sell_cash><sell_tc>-</sell_tc><CurrencyGuide
BaseSwift="SEK" Swift="ISK"
Amount="100">868,06</CurrencyGuide><base_swift>SEK</base_swift></row><row><swift_code>JOD</swift_code><swift_name>Jordanska
Dinar</swift_name><multiply>1</multiply><buy_cash>10,4464</buy_cash><buy_tc>-</buy_tc><sell_cash>11,642</sell_cash><sell_tc>-</sell_tc><CurrencyGuide
BaseSwift="SEK" Swift="JOD"
Amount="100">8,59</CurrencyGuide><base_swift>SEK</base_swift></row><row><swift_code>JPY</swift_code><swift_name>japanska
Yen</swift_name><multiply>100</multiply><buy_cash>6,4878</buy_cash><buy_tc>6,4229</buy_tc><sell_cash>6,7072</sell_cash><sell_tc>6,7072</sell_tc><CurrencyGuide
BaseSwift="SEK" Swift="JPY"
Amount="100">1?490,94</CurrencyGuide><base_swift>SEK</base_swift></row><row><swift_code>KES</swift_code><swift_name>kenyanska
Shilling</swift_name><multiply>1</multiply><buy_cash>0,104</buy_cash><buy_tc>-</buy_tc><sell_cash>0,1135</sell_cash><sell_tc>-</sell_tc><CurrencyGuide
BaseSwift="SEK" Swift="KES"
Amount="100">881,06</CurrencyGuide><base_swift>SEK</base_swift></row><row><swift_code>KRW</swift_code><swift_name>Koreanska
Won</swift_name><multiply>1</multiply><buy_cash>0,0071</buy_cash><buy_tc>-</buy_tc><sell_cash>0,0084</sell_cash><sell_tc>-</sell_tc><CurrencyGuide
BaseSwift="SEK" Swift="KRW"
Amount="100">11?904,76</CurrencyGuide><base_swift>SEK</base_swift></row><row><swift_code>KWD</swift_code><swift_name>Kuwait
Dinar</swift_name><multiply>1</multiply><buy_cash>21,04</buy_cash><buy_tc>-</buy_tc><sell_cash>27,6765</sell_cash><sell_tc>-</sell_tc><CurrencyGuide
BaseSwift="SEK" Swift="KWD"
Amount="100">3,61</CurrencyGuide><base_swift>SEK</base_swift></row><row><swift_code>LKR</swift_code><swift_name>Sri
Lankanska
Rupee</swift_name><multiply>1</multiply><buy_cash>0,0716</buy_cash><buy_tc>-</buy_tc><sell_cash>0,0807</sell_cash><sell_tc>-</sell_tc><CurrencyGuide
BaseSwift="SEK" Swift="LKR"
Amount="100">1?239,16</CurrencyGuide><base_swift>SEK</base_swift></row><row><swift_code>LTL</swift_code><swift_name>Litauiska
Litas</swift_name><multiply>1</multiply><buy_cash>2,5973</buy_cash><buy_tc>-</buy_tc><sell_cash>2,788</sell_cash><sell_tc>-</sell_tc><CurrencyGuide
BaseSwift="SEK" Swift="LTL"
Amount="100">35,87</CurrencyGuide><base_swift>SEK</base_swift></row><row><swift_code>LVL</swift_code><swift_name>Lettiska
Lats</swift_name><multiply>1</multiply><buy_cash>12,9077</buy_cash><buy_tc>-</buy_tc><sell_cash>13,851</sell_cash><sell_tc>-</sell_tc><CurrencyGuide
BaseSwift="SEK" Swift="LVL"
Amount="100">7,22</CurrencyGuide><base_swift>SEK</base_swift></row><row><swift_code>MTL</swift_code><swift_name>Malta
Lira</swift_name><multiply>1</multiply><buy_cash>20,8082</buy_cash><buy_tc>-</buy_tc><sell_cash>22,5192</sell_cash><sell_tc>-</sell_tc><CurrencyGuide
BaseSwift="SEK" Swift="MTL"
Amount="100">4,44</CurrencyGuide><base_swift>SEK</base_swift></row><row><swift_code>MUR</swift_code><swift_name>Mauritius
Rupee</swift_name><multiply>1</multiply><buy_cash>0,2408</buy_cash><buy_tc>-</buy_tc><sell_cash>0,2674</sell_cash><sell_tc>-</sell_tc><CurrencyGuide
BaseSwift="SEK" Swift="MUR"
Amount="100">373,97</CurrencyGuide><base_swift>SEK</base_swift></row><row><swift_code>MXN</swift_code><swift_name>Mexicanska
Peso</swift_name><multiply>1</multiply><buy_cash>0,7014</buy_cash><buy_tc>-</buy_tc><sell_cash>0,7711</sell_cash><sell_tc>-</sell_tc><CurrencyGuide
BaseSwift="SEK" Swift="MXN"
Amount="100">129,68</CurrencyGuide><base_swift>SEK</base_swift></row><row><swift_code>MYR</swift_code><swift_name>Malaysiska
Ringgit</swift_name><multiply>1</multiply><buy_cash>2,0061</buy_cash><buy_tc>-</buy_tc><sell_cash>2,2026</sell_cash><sell_tc>-</sell_tc><CurrencyGuide
BaseSwift="SEK" Swift="MYR"
Amount="100">45,40</CurrencyGuide><base_swift>SEK</base_swift></row><row><swift_code>NOK</swift_code><swift_name>Norska
Kroner</swift_name><multiply>1</multiply><buy_cash>1,1437</buy_cash><buy_tc>1,1322</buy_tc><sell_cash>1,1855</sell_cash><sell_tc>-</sell_tc><CurrencyGuide
BaseSwift="SEK" Swift="NOK"
Amount="100">84,35</CurrencyGuide><base_swift>SEK</base_swift></row><row><swift_code>NZD</swift_code><swift_name>Nya
Zeel?ska
Dollar</swift_name><multiply>1</multiply><buy_cash>4,7675</buy_cash><buy_tc>-</buy_tc><sell_cash>5,1061</sell_cash><sell_tc>-</sell_tc><CurrencyGuide
BaseSwift="SEK" Swift="NZD"
Amount="100">19,58</CurrencyGuide><base_swift>SEK</base_swift></row><row><swift_code>PHP</swift_code><swift_name>filippinska
Peso</swift_name><multiply>1</multiply><buy_cash>0,1469</buy_cash><buy_tc>-</buy_tc><sell_cash>0,1618</sell_cash><sell_tc>-</sell_tc><CurrencyGuide
BaseSwift="SEK" Swift="PHP"
Amount="100">618,05</CurrencyGuide><base_swift>SEK</base_swift></row><row><swift_code>PLN</swift_code><swift_name>Polska
NewZloty</swift_name><multiply>1</multiply><buy_cash>2,374</buy_cash><buy_tc>-</buy_tc><sell_cash>2,5261</sell_cash><sell_tc>-</sell_tc><CurrencyGuide
BaseSwift="SEK" Swift="PLN"
Amount="100">39,59</CurrencyGuide><base_swift>SEK</base_swift></row><row><swift_code>ROL</swift_code><swift_name>Rum?ka
Lei</swift_name><multiply>100</multiply><buy_cash>0,0242</buy_cash><buy_tc>-</buy_tc><sell_cash>0,0277</sell_cash><sell_tc>-</sell_tc><CurrencyGuide
BaseSwift="SEK" Swift="ROL"
Amount="100">361?010,83</CurrencyGuide><base_swift>SEK</base_swift></row><row><swift_code>RON</swift_code><swift_name>rum?ka
Lei
(new)</swift_name><multiply>1</multiply><buy_cash>2,5843</buy_cash><buy_tc>-</buy_tc><sell_cash>2,7678</sell_cash><sell_tc>-</sell_tc><CurrencyGuide
BaseSwift="SEK" Swift="RON"
Amount="100">36,13</CurrencyGuide><base_swift>SEK</base_swift></row><row><swift_code>RUB</swift_code><swift_name>ryska
Rubel</swift_name><multiply>1</multiply><buy_cash>0,2671</buy_cash><buy_tc>-</buy_tc><sell_cash>0,2929</sell_cash><sell_tc>-</sell_tc><CurrencyGuide
BaseSwift="SEK" Swift="RUB"
Amount="100">341,41</CurrencyGuide><base_swift>SEK</base_swift></row><row><swift_code>SAR</swift_code><swift_name>Saudiarabiska
Riyal</swift_name><multiply>1</multiply><buy_cash>1,9243</buy_cash><buy_tc>1,905</buy_tc><sell_cash>2,1362</sell_cash><sell_tc>2,1362</sell_tc><CurrencyGuide
BaseSwift="SEK" Swift="SAR"
Amount="100">46,81</CurrencyGuide><base_swift>SEK</base_swift></row><row><swift_code>SGD</swift_code><swift_name>singapore
Dollar</swift_name><multiply>1</multiply><buy_cash>4,6579</buy_cash><buy_tc>-</buy_tc><sell_cash>4,9501</sell_cash><sell_tc>-</sell_tc><CurrencyGuide
BaseSwift="SEK" Swift="SGD"
Amount="100">20,20</CurrencyGuide><base_swift>SEK</base_swift></row><row><swift_code>SIT</swift_code><swift_name>slovenska
Tolar</swift_name><multiply>1</multiply><buy_cash>0,0377</buy_cash><buy_tc>-</buy_tc><sell_cash>0,0412</sell_cash><sell_tc>-</sell_tc><CurrencyGuide
BaseSwift="SEK" Swift="SIT"
Amount="100">2?427,18</CurrencyGuide><base_swift>SEK</base_swift></row><row><swift_code>SKK</swift_code><swift_name>slovakiska
Koruna</swift_name><multiply>1</multiply><buy_cash>0,2394</buy_cash><buy_tc>-</buy_tc><sell_cash>0,261</sell_cash><sell_tc>-</sell_tc><CurrencyGuide
BaseSwift="SEK" Swift="SKK"
Amount="100">383,14</CurrencyGuide><base_swift>SEK</base_swift></row><row><swift_code>THB</swift_code><swift_name>thail?ska
Baht</swift_name><multiply>1</multiply><buy_cash>0,1875</buy_cash><buy_tc>-</buy_tc><sell_cash>0,203</sell_cash><sell_tc>-</sell_tc><CurrencyGuide
BaseSwift="SEK" Swift="THB"
Amount="100">492,61</CurrencyGuide><base_swift>SEK</base_swift></row><row><swift_code>TRY</swift_code><swift_name>Turkiska
nya
Lira</swift_name><multiply>1</multiply><buy_cash>5,6431</buy_cash><buy_tc>-</buy_tc><sell_cash>5,9965</sell_cash><sell_tc>-</sell_tc><CurrencyGuide
BaseSwift="SEK" Swift="TRY"
Amount="100">16,68</CurrencyGuide><base_swift>SEK</base_swift></row><row><swift_code>TTD</swift_code><swift_name>Trinidad
+ Tobago
Dollar</swift_name><multiply>1</multiply><buy_cash>1,2027</buy_cash><buy_tc>-</buy_tc><sell_cash>1,3183</sell_cash><sell_tc>-</sell_tc><CurrencyGuide
BaseSwift="SEK" Swift="TTD"
Amount="100">75,86</CurrencyGuide><base_swift>SEK</base_swift></row><row><swift_code>TWD</swift_code><swift_name>Taiwanesiska
New
Dollar</swift_name><multiply>1</multiply><buy_cash>0,2281</buy_cash><buy_tc>-</buy_tc><sell_cash>0,2548</sell_cash><sell_tc>-</sell_tc><CurrencyGuide
BaseSwift="SEK" Swift="TWD"
Amount="100">392,46</CurrencyGuide><base_swift>SEK</base_swift></row><row><swift_code>USD</swift_code><swift_name>amerikanska
Dollar</swift_name><multiply>1</multiply><buy_cash>7,5694</buy_cash><buy_tc>7,4937</buy_tc><sell_cash>7,841</sell_cash><sell_tc>7,841</sell_tc><CurrencyGuide
BaseSwift="SEK" Swift="USD"
Amount="100">12,75</CurrencyGuide><base_swift>SEK</base_swift></row><row><swift_code>XCD</swift_code><swift_name>?t
Karibiska
Dollar</swift_name><multiply>1</multiply><buy_cash>2,7967</buy_cash><buy_tc>-</buy_tc><sell_cash>3,1168</sell_cash><sell_tc>-</sell_tc><CurrencyGuide
BaseSwift="SEK" Swift="XCD"
Amount="100">32,08</CurrencyGuide><base_swift>SEK</base_swift></row><row><swift_code>XOF</swift_code><swift_name>v?afrikanska
Franc</swift_name><multiply>1</multiply><buy_cash>0,0128</buy_cash><buy_tc>-</buy_tc><sell_cash>0,0157</sell_cash><sell_tc>-</sell_tc><CurrencyGuide
BaseSwift="SEK" Swift="XOF"
Amount="100">6?369,43</CurrencyGuide><base_swift>SEK</base_swift></row><row><swift_code>ZAR</swift_code><swift_name>sydafrikanska
Rand</swift_name><multiply>1</multiply><buy_cash>1,1965</buy_cash><buy_tc>1,1845</buy_tc><sell_cash>1,303</sell_cash><sell_tc>1,303</sell_tc><CurrencyGuide
BaseSwift="SEK" Swift="ZAR"
Amount="100">76,75</CurrencyGuide><base_swift>SEK</base_swift></row><copyright>Copyright
FOREX 2006</copyright></web_dis_rates>

Mar 20 '06 #1
2 1358
ho**@havet.se wrote:
Hi . My problem is that I have XML provided to me by URL but there are
no ID tags. How do I loop through and find a specific value in the XML?


Use an XPath query, if your system supports XPath. Or write a program
that navigates the document and searches for those values, using either
the DOM or SAX APIs, depending on which your system supports.

There are lots of good tutorials on all three on the web.

Without knowing more about the environment in which you're writing this,
it's hard to say more than that.
--
() ASCII Ribbon Campaign | Joe Kesselman
/\ Stamp out HTML e-mail! | System architexture and kinetic poetry
Mar 20 '06 #2
ho**@havet.se wrote:
Hi . My problem is that I have XML provided to me by URL but there are
no ID tags. How do I loop through and find a specific value in the XML?
The site I'm working on uses classic ASP. Here is my code and the xml
that is returned by the URL

<%'--------------------------------------%>
URL = "http://www.forex.se/ratesxml.asp?id=269"
set xmlhttp = CreateObject("Microsoft.XMLHTTP")
xmlhttp.open "GET", URL, false
xmlhttp.send ""
result = xmlhttp.responseText
Response.Write result
<%'------------- so far so good.---%>

here my problems start. I usually use getElementsByTagName but it just
won't work here since the xml doesn't seem to have ID's.
Elements don't normally have ID attributes unless they are specially
interesting.
How do I do to
for example get the value of EUR for SEK in the file? The entire
response XML is pasted bellow .


The element you are presumably interested in is

<row>
<swift_code>EUR</swift_code>
<swift_name>Euro</swift_name>
<multiply>1</multiply>
<buy_cash>9,2486</buy_cash>
<buy_tc>9,1561</buy_tc>
<sell_cash>9,5274</sell_cash>
<sell_tc>9,5274</sell_tc>
<CurrencyGuide BaseSwift="SEK" Swift="EUR"
Amount="100">10,50</CurrencyGuide>
<base_swift>SEK</base_swift>
</row>

right?

Just use an XPath statement like
//row[swift_code='EUR'][base_swift='SEK']/buy_cash
(or whatever element you're interested in at the end).

///Peter
--
XML FAQ: http://xml.silmaril.ie/
Mar 20 '06 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

3
11180
by: William C. White | last post by:
Does anyone know of a way to use PHP /w Authorize.net AIM without using cURL? Our website is hosted on a shared drive and the webhost company doesn't installed additional software (such as cURL)...
2
5775
by: Albert Ahtenberg | last post by:
Hello, I don't know if it is only me but I was sure that header("Location:url") redirects the browser instantly to URL, or at least stops the execution of the code. But appearantely it continues...
3
22958
by: James | last post by:
Hi, I have a form with 2 fields. 'A' 'B' The user completes one of the fields and the form is submitted. On the results page I want to run a query, but this will change subject to which...
0
8436
by: Ollivier Robert | last post by:
Hello, I'm trying to link PHP with Oracle 9.2.0/OCI8 with gcc 3.2.3 on a Solaris9 system. The link succeeds but everytime I try to run php, I get a SEGV from inside the libcnltsh.so library. ...
1
8540
by: Richard Galli | last post by:
I want viewers to compare state laws on a single subject. Imagine a three-column table with a drop-down box on the top. A viewer selects a state from the list, and that state's text fills the...
4
18217
by: Albert Ahtenberg | last post by:
Hello, I have two questions. 1. When the user presses the back button and returns to a form he filled the form is reseted. How do I leave there the values he inserted? 2. When the...
1
6777
by: inderjit S Gabrie | last post by:
Hi all Here is the scenerio ...is it possibly to do this... i am getting valid course dates output on to a web which i have designed ....all is okay so far , look at the following web url ...
2
31346
by: Jack | last post by:
Hi All, What is the PHP equivilent of Oracle bind variables in a SQL statement, e.g. select x from y where z=:parameter Which in asp/jsp would be followed by some statements to bind a value...
3
23533
by: Sandwick | last post by:
I am trying to change the size of a drawing so they are all 3x3. the script below is what i was trying to use to cut it in half ... I get errors. I can display the normal picture but not the...
0
7257
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
7157
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
1
7098
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
5682
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
1
5084
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...
0
4745
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...
0
3232
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The...
0
3221
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
798
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.