Ciao a tutti.
Ho un problema con l'apertura di un feed che dovrebbe essere standard:
http://www.siciliatravel.com/2006/ultimenews.asp
questo feed lo apro con:
<%
rssURL2 = "http://www.siciliatravel.com/2006/ultimenews.asp"
'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
rssFile2 = objXML.Load(rssURL2)
'Se ci sono errori stampo a video
If Not rssFile2 Then
Response.write "ERRORE..."
'Se NON ci sono errori proseguo...
Else
'Recupero i dati dai nodi Item (e sotto nodi)
Set objNodeList = objXML.getElementsByTagName("item")
For Each objNode In objNodeList
For Each objNode2 In objNode.childNodes
Select Case objNode2.nodeName
Case "title"
strTitle = objNode2.firstChild.nodevalue
Case "link"
strURL = objNode2.firstChild.nodevalue
End Select
Next
%>
<ul>
<li>
<a target="_blank" href="<%=strURL%>" title="<%=mid(strTitle,22)%>"><%=mid(strTitle,22,35)%>...</a>
</li>
</ul>
<%
'azzero tutto per il prossimo passaggio
strTitle = ""
strURL = ""
strDescription = ""
Next
set objNodeList = Nothing
End if
%>
ma stranamente mi va in errore...
potete spiegarmi perchè? o almeno capire coem individuare gli errori dovutia codice xml non formattato.
grazie.
:beer:
Ho un problema con l'apertura di un feed che dovrebbe essere standard:
http://www.siciliatravel.com/2006/ultimenews.asp
questo feed lo apro con:
<%
rssURL2 = "http://www.siciliatravel.com/2006/ultimenews.asp"
'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
rssFile2 = objXML.Load(rssURL2)
'Se ci sono errori stampo a video
If Not rssFile2 Then
Response.write "ERRORE..."
'Se NON ci sono errori proseguo...
Else
'Recupero i dati dai nodi Item (e sotto nodi)
Set objNodeList = objXML.getElementsByTagName("item")
For Each objNode In objNodeList
For Each objNode2 In objNode.childNodes
Select Case objNode2.nodeName
Case "title"
strTitle = objNode2.firstChild.nodevalue
Case "link"
strURL = objNode2.firstChild.nodevalue
End Select
Next
%>
<ul>
<li>
<a target="_blank" href="<%=strURL%>" title="<%=mid(strTitle,22)%>"><%=mid(strTitle,22,35)%>...</a>
</li>
</ul>
<%
'azzero tutto per il prossimo passaggio
strTitle = ""
strURL = ""
strDescription = ""
Next
set objNodeList = Nothing
End if
%>
ma stranamente mi va in errore...
potete spiegarmi perchè? o almeno capire coem individuare gli errori dovutia codice xml non formattato.
grazie.
:beer:
Ultima modifica: