<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0"><channel><title><![CDATA[connettersi ad un file RSS remoto]]></title><description><![CDATA[<p dir="auto">Cari amici, ho un piccolo problema</p>
<p dir="auto">Sono riuscita a trovare dove posso recuperare prezzo del euro in diverse monete</p>
<p dir="auto">solo che non riesco a leggere una parte del file xml<br />
il codice è questo</p>
<pre><code>&lt;%
rssURL =[URL]http://www.bankofcanada.ca/databank/client_output/7833.xml[/URL]
'Creo l'oggetto DOM XML
Set objXML = Server.CreateObject("msxml2.DOMDocument.3.0")
'Imposto le proprietà dell'oggetto
objXML.async = false
objXML.setProperty "ServerHTTPRequest", True
objXML.validateOnParse =false
objXML.preserveWhiteSpace = false
'Carico il file RSS dalla URL
rssFile = objXML.Load(rssURL)
 
'Se ci sono errori stampo a video
If Not rssFile Then
Response.write "ERRORE..."
'Se NON ci sono errori proseguo...
Else
'Recupero i dati dai nodi Item (e sotto nodi)
Set objNodeList = objXML.getElementsByTagName("Currency_name") 
 
 For Each objNode In objNodeList
For Each objNode2 In objNode.childNodes
 
Select Case objNode2.nodeName
 
 
 
Case "Observation_data"
strv1 = objNode2.firstChild.nodevalue
Case "Observation_data"
strv2 = objNode2.firstChild.nodevalue
Case "Observation_data"
strv3 = objNode2.firstChild.nodevalue
End Select
Next
Response.write strv1&amp;" - "&amp;strv2&amp;" - "&amp;strv3&amp;"&lt;br&gt;"
 
 'azzero tutto per il prossimo passaggio
strv1 = ""
strv2 = ""
strv3 = ""
'end if
Next
%&gt;
</code></pre>
<p dir="auto">in questo script vorrei recuperare la cifra che è su <strong>strv2</strong> o <strong>strv3</strong><br />
il problema è che ci sono tre targe <strong>Observation_data</strong> uguale<br />
Aiutto!:x</p>
]]></description><link>https://dev.connect.gt/topic/48308/connettersi-ad-un-file-rss-remoto</link><generator>RSS for Node</generator><lastBuildDate>Wed, 25 Nov 2026 23:29:27 GMT</lastBuildDate><atom:link href="https://dev.connect.gt/topic/48308.rss" rel="self" type="application/rss+xml"/><pubDate>Wed, 26 Sep 2007 23:42:15 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to connettersi ad un file RSS remoto on Fri, 28 Sep 2007 15:04:39 GMT]]></title><description><![CDATA[<p dir="auto">Si, me sembra che i files csv di yahoo sono ben aggiornati!</p>
]]></description><link>https://dev.connect.gt/post/608080</link><guid isPermaLink="true">https://dev.connect.gt/post/608080</guid><dc:creator><![CDATA[eliane]]></dc:creator><pubDate>Fri, 28 Sep 2007 15:04:39 GMT</pubDate></item><item><title><![CDATA[Reply to connettersi ad un file RSS remoto on Fri, 28 Sep 2007 14:42:31 GMT]]></title><description><![CDATA[<p dir="auto">Ciao Legolas</p>
<p dir="auto">Grazie, ma quello che ho bisogno è il cambio valuta che se aggiorna di alcuni paese di Sud America</p>
<p dir="auto">Ho trovato risposta per quello script che ho messo<br />
il membro che se chiama KOLOSSEO<br />
del sito html ha risolto<br />
ecco la soluzione:</p>
<pre><code>&lt;%
dim arrObservation(3)dim indexArrayObservation rssURL ="http://www.bankofcanada.ca/databank/client_output/7833.xml"Set objXML = Server.CreateObject("msxml2.DOMDocument.3.0")objXML.async = falseobjXML.setProperty "ServerHTTPRequest", TrueobjXML.validateOnParse =falseobjXML.preserveWhiteSpace = falserssFile = objXML.Load(rssURL)If Not rssFile Then             Response.write "ERRORE..."Else    Set objNodeList = objXML.getElementsByTagName("Currency_name")     For Each objNode In objNodeList        For Each objNode2 In objNode.childNodes            if objNode2.nodeName="Observation_data" then               arrObservation(indexArrayObservation)=objNode2.firstChild.nodevalue               if indexArrayObservation&lt;2 then                   indexArrayObservation=indexArrayObservation+1               end if            end if        Next        Response.write arrObservation(1) &amp; " - " &amp; arrObservation(2) &amp; "&lt;br&gt;"        indexArrayObservation=0     Nextend if
%&gt;
</code></pre>
<p dir="auto">ma solo che il file <a href="http://www.bankofcanada.ca/databank/client_output/7833.xml" rel="nofollow ugc">http://www.bankofcanada.ca/databank/client_output/7833.xml</a> me sembra che ha un tempo di scadenza,<br />
prima funzionava ma adesso non funziona più<br />
ho presso qui: <a href="http://www.bankofcanada.ca/en/rates/exchform.html" rel="nofollow ugc">http://www.bankofcanada.ca/en/rates/exchform.html</a></p>
<p dir="auto">allora ho cambiato sistema e prendo dai files cvs di yahoo in questo modo:</p>
<pre><code>&lt;%
url="[URL]http://it.old.finance.yahoo.com/d/quotes.csv?s=EURUSD=X&amp;f=sl1d1t1c1ohgv&amp;e=.csv[/URL]" 'Dollaro USA
Set xml = Server.CreateObject("Microsoft.XMLHTTP")
 xml.Open "GET", url, False
 xml.Send
 stringa=xml.responseText
set xml = nothing
'a questo punto nella variabile STRINGA abbiamo il contenuto del file indicato nell'url
 
ARR=SPLIT(stringa,":") 'spezza la colonna
for i=0 to ubound(arr)
 arr2=split(arr(i),";") 'spezza la riga
  for j=0 to ubound(arr2)
   if (i=0 and j=1) then 
   'abbiamo trovato il B1 (i=0,j=1 è l'indice di B1)
 
    EURUSD=arr2(j)
    'ora possiamo anche uscire dal for (che ce frega..)
    exit for
   end if
  next
next
'response.Write(EURUSD&amp;"&lt;br&gt;")
''''''''''''''''''''''''''''''''''
url2="[URL]http://it.old.finance.yahoo.com/d/quotes.csv?s=EURBRL=X&amp;f=sl1d1t1c1ohgv&amp;e=.csv[/URL]" 'Brasile - Real
Set xmlBRL = Server.CreateObject("Microsoft.XMLHTTP")
 xmlBRL.Open "GET", url2, False
 xmlBRL.Send
 stringaBRL=xmlBRL.responseText
set xmlBRL = nothing
'a questo punto nella variabile STRINGA abbiamo il contenuto del file indicato nell'url
 
ARRBRL=SPLIT(stringaBRL,":") 'spezza la colonna
for iBRL=0 to ubound(arrBRL)
 arr2BRL=split(arrBRL(iBRL),";") 'spezza la riga
  for jBRL=0 to ubound(arr2BRL)
   if (iBRL=0 and jBRL=1) then 
   'abbiamo trovato il B1 (i=0,j=1 è l'indice di B1)
 
    EURBRL=arr2BRL(jBRL)
    'ora possiamo anche uscire dal for (che ce frega..)
    exit for
   end if
  next
next
'response.Write(EURBRL&amp;"&lt;br&gt;")
'''''''''''''''
url3="[URL]http://it.old.finance.yahoo.com/d/quotes.csv?s=EURCUP=X&amp;f=sl1d1t1ba&amp;e=.csv[/URL]" ' Colombia - Peso
Set xmlCOP = Server.CreateObject("Microsoft.XMLHTTP")
 xmlCOP.Open "GET", url3, False
 xmlCOP.Send
 stringaCOP=xmlCOP.responseText
set xmlCOP = nothing
'a questo punto nella variabile STRINGA abbiamo il contenuto del file indicato nell'url
 
ARRCOP=SPLIT(stringaCOP,":") 'spezza la colonna
for iCOP=0 to ubound(arrCOP)
 arr2COP=split(arrCOP(iCOP),";") 'spezza la riga
  for jCOP=0 to ubound(arr2COP)
   if (iCOP=0 and jCOP=1) then 
   'abbiamo trovato il B1 (i=0,j=1 è l'indice di B1)
 
    EURCOP=arr2COP(jCOP)
    'ora possiamo anche uscire dal for (che ce frega..)
    exit for
   end if
  next
next
'response.Write(EURCOP&amp;"&lt;br&gt;")
'''''''''''''''''''''''''''''''''''''
url4="[URL]http://it.old.finance.yahoo.com/d/quotes.csv?s=EURPEN=X&amp;f=sl1d1t1ba&amp;e=.csv[/URL]" 'Perù - Sol
Set xmlPEN = Server.CreateObject("Microsoft.XMLHTTP")
 xmlPEN.Open "GET", url4, False
 xmlPEN.Send
 stringaPEN=xmlPEN.responseText
set xmlPEN = nothing
'a questo punto nella variabile STRINGA abbiamo il contenuto del file indicato nell'url
 
ARRPEN=SPLIT(stringaPEN,":") 'spezza la colonna
for iPEN=0 to ubound(arrPEN)
 arr2PEN=split(arrPEN(iPEN),";") 'spezza la riga
  for jPEN=0 to ubound(arr2PEN)
   if (iPEN=0 and jPEN=1) then 
   'abbiamo trovato il B1 (i=0,j=1 è l'indice di B1)
 
    EURPEN=arr2PEN(jPEN)
    'ora possiamo anche uscire dal for (che ce frega..)
    exit for
   end if
  next
next
'response.Write(EURPEN&amp;"&lt;br&gt;")
'''''''''''''''''''''''''''''''''''''
url5="[URL="http://it.old.finance.yahoo.com/d/quotes.csv?s=EURVEB=X&amp;f=sl1d1t1ba&amp;e=.csv&amp;quot;'Venezuela"]http://it.old.finance.yahoo.com/d/quotes.csv?s=EURVEB=X&amp;f=sl1d1t1ba&amp;e=.csv"'Venezuela[/URL] - Bolivar
Set xmlVEB = Server.CreateObject("Microsoft.XMLHTTP")
 xmlVEB.Open "GET", url5, False
 xmlVEB.Send
 stringaVEB=xmlVEB.responseText
set xmlVEB = nothing
'a questo punto nella variabile STRINGA abbiamo il contenuto del file indicato nell'url
 
ARRVEB=SPLIT(stringaVEB,":") 'spezza la colonna
for iVEB=0 to ubound(arrVEB)
 arr2VEB=split(arrVEB(iVEB),";") 'spezza la riga
  for jVEB=0 to ubound(arr2VEB)
   if (iVEB=0 and jVEB=1) then 
   'abbiamo trovato il B1 (i=0,j=1 è l'indice di B1)
 
    EURVEB=arr2VEB(jVEB)
    'ora possiamo anche uscire dal for (che ce frega..)
    exit for
   end if
  next
next
'response.Write(EURVEB&amp;"&lt;br&gt;")
 
'''''''''''''''''''''''
url6="[URL]http://it.old.finance.yahoo.com/d/quotes.csv?s=EURARS=X&amp;f=sl1d1t1ba&amp;e=.csv[/URL]" 'Argentina - Peso
Set xmlARS = Server.CreateObject("Microsoft.XMLHTTP")
 xmlARS.Open "GET", url6, False
 xmlARS.Send
 stringaARS=xmlARS.responseText
set xmlARS = nothing
'a questo punto nella variabile STRINGA abbiamo il contenuto del file indicato nell'url
 
ARRARS=SPLIT(stringaARS,":") 'spezza la colonna
for iARS=0 to ubound(arrARS)
 arr2ARS=split(arrARS(iARS),";") 'spezza la riga
  for jARS=0 to ubound(arr2ARS)
   if (iARS=0 and jARS=1) then 
   'abbiamo trovato il B1 (i=0,j=1 è l'indice di B1)
 
    EURARS=arr2ARS(jARS)
    'ora possiamo anche uscire dal for (che ce frega..)
    exit for
   end if
  next
next
'response.Write(EURARS&amp;"&lt;br&gt;")
 
 
%&gt;
</code></pre>
<p dir="auto">in verità sono una frana ,<br />
Forse se potrebbe fare un codice meglio di quello che ho fatto.</p>
<p dir="auto">Del modo che ho fatto funziona ma ancora sto provando se i files cvs di yahoo aggiona o non.<br />
gli prendo qui: <a href="http://it.finance.yahoo.com/valuta/convert?amt=1&amp;from=EUR&amp;to=VEB&amp;submit=Converti" rel="nofollow ugc">http://it.finance.yahoo.com/valuta/convert?amt=1&amp;from=EUR&amp;to=VEB&amp;submit=Converti</a></p>
]]></description><link>https://dev.connect.gt/post/608079</link><guid isPermaLink="true">https://dev.connect.gt/post/608079</guid><dc:creator><![CDATA[eliane]]></dc:creator><pubDate>Fri, 28 Sep 2007 14:42:31 GMT</pubDate></item><item><title><![CDATA[Reply to connettersi ad un file RSS remoto on Fri, 28 Sep 2007 13:58:01 GMT]]></title><description><![CDATA[<p dir="auto">Ciao, non riesco a visualizzare il file xml controlla l'url.<br />
Nel frattempo ti suggerisco di dare un'occhiata anche a questo file che utilizzo anche io nelle mie applicazioni ed è abbastanza semplice da leggere.</p>
<p dir="auto"><a href="http://www.ecb.europa.eu/stats/eurofxref/eurofxref-daily.xml" rel="nofollow ugc">http://www.ecb.europa.eu/stats/eurofxref/eurofxref-daily.xml</a></p>
<p dir="auto"><img src="https://dev.connect.gt/assets/plugins/nodebb-plugin-emoji/emoji/customizations/54a3bffb-5e4a-4eb8-81dc-99b2072e5d05-175.gif?v=12b9555a9a1" class="not-responsive emoji emoji-customizations emoji--ciauz" style="height:1.4em;width:auto;vertical-align:middle" title=":ciauz:" alt="" /></p>
]]></description><link>https://dev.connect.gt/post/608068</link><guid isPermaLink="true">https://dev.connect.gt/post/608068</guid><dc:creator><![CDATA[legolas]]></dc:creator><pubDate>Fri, 28 Sep 2007 13:58:01 GMT</pubDate></item></channel></rss>