<%
'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
caricoFile = objXML.Load("flusso Rss che include solo la categoria immagine")
' 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 & "
"
Else
' In caso non vi sia nessun errore, proseguo e carico le info del file xml (feed rss)
Set Nodo = objXML.getElementsByTagName("item")
dim cont1
cont1 = 1
For Each objNodi In Nodo
' Sfoglio i nodi
For Each objNodo In objNodi.childNodes
Select Case objNodo.nodeName
Case "content:encoded"
foto = objNodo.firstChild.nodevalue
End Select
Next
Response.Write (foto)
if cont1 = 1 then exit for
cont1 = cont1 + 1
Next
set Nodo = Nothing
End if
%>