Salve, sto realizzando un sito e vorrei far comparire 6 feed rss di altri siti sulla pagina del mio sito.
Se ne inserisco 1 solo funziona tutto ma se ne metto 2 ho problemi...
Mi chiedevo: esiste un modo per metterli tutti e 6 insieme?
Questo il codice:
codice HTML:<div class="row 50%"> <div class="4u"> </div> <% Dim objXML, caricoFile, NumeroMassimoNews, Nodo, cont, objNodi, objNodo, Titolo, link, descrizione '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 caricoFile = objXML.Load("https://www.inps.it/Bussola/RssFeed.aspx?itiponews=1") 'numero massimo di news NumeroMassimoNews=1 ' Controllo se e' stato caricato il file If Not caricoFile Then ' In caso di errore avviso quale errore si e' verificato Response.write "Errore: " & objXML.parseError.errorCode & "" Response.Write "Linea: " & objXML.parseError.line & "/" Response.WRite "Colonna: " & objXML.parseError.linepos & "</p>" Else ' In caso non vi sia nessun errore, proseguo e carico le info del file xml (feed rss) Set Nodo = objXML.getElementsByTagName("item") cont=0 For Each objNodi In Nodo cont=cont+1 if cont<=NumeroMassimoNews then ' 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 'Response.Write ("<font face='Trebuchet MS' color='#0066CC' style='font-size: 14pt; ' >" & titolo & "</font>") 'Response.Write ("<font face='Trebuchet MS' color='#000000' style='font-size: 10pt; ' > " & descrizione & " ('"& link &"')</font>") %> <div> <h4> <a href="<%=(link)%>" target="_blank"> <% Response.Write ("<font face='Trebuchet MS' color='#0066CC' style='font-size: 14pt; ' >" & titolo & "</font>") %> </a> </h4> </div> <% end if Next set Nodo = Nothing End if %> </div>

Rispondi quotando