2
我至今
我創造了我的網站的新聞飼料,我現在有這個。天冬氨酸XML feed閱讀器
<%
TheFeed = "http://feeds.feedburner.com/Actsoft"
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
For Each objItem in objItems
On Error Resume Next
TheTitle = objItem.selectSingleNode("title").Text
TheLink = objItem.selectSingleNode("link").Text
Response.Write "<div class='article'>" &_
"<a href=" & TheLink & ">" & _
"<span>" & TheTitle & "</span>" & _
"</a>" & _
"</div>"
Next
End If
Set objItems = Nothing
End If
Else
Response.Write "There was an error retrieving the news feed"
End If
Set objXML = Nothing
%>
我希望限制顯示在我的讀者對象的量我需要這份
的。現在每篇文章正在顯示,我想限制只顯示前4.
我新的Asp所以我不知道如何去做這件事。
+1並值得更多upvotes。 – Filburt
這必須是我在Stack Overflow上收到的最好答案。非常感謝。 – WhosDustin