ASP tirare notizie NTVMSNBC'den
Con il seguente codice NTVMSNBC notizie 'da XML methoduyla può assumere.
NTVMSNBC 'appartiene a tutti gli RSS indirizzi sono reperibili a questo indirizzo: http://www.ntvmsnbc.com/id/24939559
Nel mio codice che utilizzo RSS indirizzo, NTV è di proprietà della sezione di notizie di tecnologia.
<%
TheFeed = "http://www.ntvmsnbc.com/id/24927532/device/rss/rss.xml"Set objXML = Server.CreateObject ("Microsoft.XMLDOM")
objXML.Async = False
objXML.SetProperty "ServerHTTPRequest", True
objXML.ResolveExternals = True
objXML.ValidateOnParse = True
objXML.Load (TheFeed)
CellCount = 0
Se (objXML.parseError.errorCode = 0) Then
Set objRoot = objXML.documentElement
Se IsObject (objRoot) = False Then
Response.Write "L'operazione non riuscita."
Altro
objItems Set = objRoot.getElementsByTagName ("item")
Se IsObject (objItems) = True Then
Per ogni objItem in objItems
On Error Resume Next
= TheTitle objItem.selectSingleNode ("titolo"). Testo
ObjItem.selectSingleNode thelink = ("link"). Testo
ObjItem.selectSingleNode TheDesc = ("descrizione"). Text
ObjItem.selectSingleNode TheDate = ("pubDate"). TextResponse.Write "<a href=" & thelink & ">" & _
"<b>" & TheTitle & "</ b>" & _
"</ A>" & _
"<br />"Response.Write & _ TheDesc
"<br />"Response.Write & _ TheDate
"<hr />
'Tu aggiungere record al codice del database. In base alle proprie esigenze.
Prossimo
Response.Write ("Notizie dalla NTV.")
End If
ObjItems = Nothing Set
End If
Altro
Response.Write "Operazione non riuscita."
End IfObjXML = Nothing Set
%>
Se avete problemi durante l'esecuzione del codice su questo argomento fatemelo sapere nei commenti qui sotto.

