Læse rss
Jeg vil gerne have adressen på billedet ud i f.eks:<enclosure url="http://bt.bmcdn.dk/media/cache/resolve/image_200x112/image/99/991795/16602268-privat.jpg" type="image/jpeg" length="26765"/>
Skal blive til :
http://bt.bmcdn.dk/media/cache/resolve/image_200x112/image/99/991795/16602268-privat.jpg
Se hele rss-filen her: http://www.bt.dk/bt/top/rss
Min kode ser sådan her ud:
TheFeed = "http://www.bt.dk/bt/top/rss"
Set objXML = Server.CreateObject("Microsoft.XMLDOM")
objXML.Async = False
objXML.SetProperty "ServerHTTPRequest", True
objXML.ResolveExternals = True
objXML.ValidateOnParse = True
objXML.Load(TheFeed)
CellCount = 0
If (objXML.parseError.errorCode = 0) Then
Set objRoot = objXML.documentElement
If IsObject(objRoot) = False Then
Response.Write "There was an error retrieving the news feed"
Else
Set objItems = objRoot.getElementsByTagName("item")
If IsObject(objItems) = True Then
intAntal = 0
For Each objItem in objItems
intAntal = intAntal + 1
On Error Resume Next
TheTitle = objItem.selectSingleNode("title").Text
TheDesc = objItem.selectSingleNode("description").Text
TheLink = objItem.selectSingleNode("link").Text
TheEncl = objItem.selectSingleNode("enclosure").Text '<---HER ---
TheDate = objItem.selectSingleNode("pubDate").Text
Response.Write TheTitle & "<br>"
Response.Write TheDesc & "<br>"
Response.Write TheLink & "><br>"
Response.Write TheEncl & " - Pic<br>"
Response.Write TheDate & "<br>"
'Response.Write "<hr />"
if intAntal > 0 then
exit for
end if
Next
End If
Set objItems = Nothing
End If
Else
Response.Write "There was an error retrieving the news feed"
End If
Set objXML = Nothing
Håber nogen kan hjælpe mig