|
Announcements |
Click here to add the RSS feed to your browser or aggregator ---> |
|
<%
Set objXML = Server.CreateObject("Microsoft.XMLDOM")
Set objLst = Server.CreateObject("Microsoft.XMLDOM")
Set objAnn = Server.CreateObject("Microsoft.XMLDOM")
objXML.async = False
objXML.Load (Server.MapPath("141_RSS.xml"))
If objXML.parseError.errorCode <> 0 Then
'handle the error
End If
%>
<%
Set objLst = objXML.getElementsByTagName("item")
noOfItems = objLst.length
For i = 0 To ( noOfItems - 1 )
Set objAnn = objLst.item(i)
'write the XML title followed by description
Response.Write("- " & objAnn.childNodes(0).text & ": " & objAnn.childNodes(1).text)
'determine current page URL
currentPage = "http://" & Request.ServerVariables("SERVER_NAME") & LCase(Request.ServerVariables("URL"))
'if XML link is not the same URL as current page, don't show a link
'(showing the link would create a circular scenario
If objAnn.childNodes(2).text <> currentPage Then
Response.Write(" [ Link ]
")
Else
Response.Write("")
End If
Next
%>
|
|
|
|