Salve a tutti, vorrei leggere il risultato di due feed non importa come, anche accodarli uno dietro all'altro, avrei pensato ad un ciclo for, ma non so come agire:
codice:
<%
'Utilizzo oggetto DOM per caricare il file xml (feed rss)
Set objXML = Server.CreateObject("msxml2.DOMDocument.3.0")
objXML.async = false
objXML.setProperty "ServerHTTPRequest" , True
objXML.validateOnParse =false
objXML.preserveWhiteSpace = false
' Carico news di WebMasterPoint.org
elencositi = www.sito1/feed, www.sito2/feed
for i = 0 to ubound(elencositi)
caricoFile = objXML.Load(elencositi(0))
' Controllo se e' stato caricato il file
If Not caricoFile Then
Response.write ("errore")
next
Else
' In caso non vi sia nessun errore, proseguo e carico le info del file xml (feed rss)
Set Nodo = objXML.getElementsByTagName("item")
For Each objNodi In Nodo
' Sfoglio i nodi
For Each objNodo In objNodi.childNodes
Select Case objNodo.nodeName
Case "title"
titolo = objNodo.firstChild.nodevalue
Case "link"
link = objNodo.firstChild.nodevalue
Case "description"
descrizione = objNodo.firstChild.nodevalue
Case "dc:date"
data = objNodo.firstChild.nodevalue
data = Replace(data,"T" ," alle ")
data = Replace(data," +00:00" ,"")
End Select
Next
' VISUALIZZO LA NOTIZIA
Response.write ("[*]<a href=""" & link & """ title=""Leggi: " & titolo & " "" target=""_blank"">")
Response.Write (titolo & "</a> <font color=""#CCCCCC"">" & data & "</font>
" & descrizione & " (Leggi tutto...)")
Next
next 'next del mio ciclo for
set Nodo = Nothing
End if
%>
che ne dite il mio ragionamento è giusto?
grazie, ciao.