Noticias de Informatica
05/09/2010 01:23
"
html = html &objNode2.firstChild.nodevalue
html = html &" "
Case "link"
'Define Propriedades do link
html = html &""
html = html & objNode2.firstChild.nodevalue
html = html &" "
Case "description"
'Está desabilitado para exibir apenas os links
html = html &""
html = html & objNode2.firstChild.nodevalue
html = html &" "
End Select
Next
Next
html = html &"
"
Set objNodeList = objXML.getElementsByTagName("item")
contador = 0
For Each objNode In objNodeList
'Definindo quantidade de notícias que será exibida
if contador < 5 then
contador = contador + 1
For Each objNode2 In objNode.childNodes
Select Case objNode2.nodeName
Case "title"
strTitle = objNode2.firstChild.nodevalue
Case "link"
strURL = objNode2.firstChild.nodevalue
Case "description"
strDescription = objNode2.firstChild.nodevalue
End Select
Next
html = html &""& strTitle &"
"& strDescription &" "
strTitle = ""
strURL = ""
strDescription = ""
End if
Next
'Variável onde gardamos o conteúdo do RSS
html = ""& html &"
"
set objNodeList = Nothing
End if
%>
<% ' Script ASP Para leitura de arquivos de RSS. url = "https://www.euquerotrabalharnogoogle.com/feed/" 'Aqui vai o endereço do arquivo RSS, ou do arquivo "gerador" ' Criando Objeto XML Set objXML = Server.CreateObject("msxml2.DOMDocument.3.0") objXML.async = false objXML.setProperty "ServerHTTPRequest", True ' Não validar o arquivo objXML.validateOnParse = false ' Retirar espaços objXML.preserveWhiteSpace = false blnLoaded = objXML.Load(url) 'Condição caso não tenha notícias no RSS If Not blnLoaded Then Response.write "Nenhuma notícia na fonte!" Else set objNodeList = objXML.getElementsByTagName("channel") For Each objNode In objNodeList For Each objNode2 In objNode.childNodes Select Case objNode2.nodeName Case "title" 'Define Propriedades do Titulo html = html &"
"& strDescription &"
<% 'Exibindo notícias do RSS escolhido Response.write (html) %> |