Ir para conteúdo

POWERED BY:

Arquivado

Este tópico foi arquivado e está fechado para novas respostas.

sims

Como limitar a quantidade de dados e tirar o cabecalho

Recommended Posts

Ola a todos,

Gostaria da juda de voces para para retirar o cabecalho desse fedd pois quero mostra-lo na primeira pagina do meu site e nao e nada legal.

gostaria tambem de limitar a quantidade de registros.

 

sera q alguem pode ajudar.

 

o codigo e esse:

 

<%' Script ASP Para leitura de arquivos de RSS.url = "http://info.abril.com.br/aberto/infonews/rssnews.xml" 'Aqui vai o endereço do arquivo RSS, ou do arquivo "gerador"' Criando Objeto XMLSet objXML = Server.CreateObject("msxml2.DOMDocument.3.0")objXML.async = falseobjXML.setProperty "ServerHTTPRequest", True' Não validar o arquivoobjXML.validateOnParse =false' true' Retirar espaçosobjXML.preserveWhiteSpace = falseblnLoaded = objXML.Load(url)If Not blnLoaded Then	Response.write "Nenhum 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"			html = html &"<tr><td><b>"			html = html &objNode2.firstChild.nodevalue			html = html &"</b></td></tr>"		Case "link"			html = html &"<tr><td><a target=_blank href="& objNode2.firstChild.nodevalue &">"			html = html & objNode2.firstChild.nodevalue			html = html &"</a></td></tr>"		Case "description" 'Está desabilitado para exibir apenas os links			html = html &"<tr><td><i>"			html = html & objNode2.firstChild.nodevalue			html = html &"</i></td></tr>"		End Select		Next	Next	html = html &"<tr><td><hr></td></tr>"	Set objNodeList = objXML.getElementsByTagName("item")	For Each objNode In objNodeList		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 &"<tr><td><li/><b><a target=_blank href="& strURL &">"& strTitle &"</a></b>"		strTitle = ""		strURL = ""		strDescription = ""	Next	html = "<table>"& html &"</table>"	set objNodeList = NothingEnd if%><html><head><meta http-equiv="Content-Type" content="text/html; charset=windows-1252"></head><body><%Response.write (html)%></body></html>

O link dele funcionando:

http://www.atualidadeonline.com.br/rogerio/feed.asp

 

obrigado a todos,

Compartilhar este post


Link para o post
Compartilhar em outros sites

Olá Galera!!

Consegui.

ui fuçando ate conseguir. e ta ai pra quem precisa como eu.

nao consegui limitar o numero de noticias mais tirei o cabeçalho.

 

segue o novo codigo.

<%' Script ASP Para leitura de arquivos de RSS.url = "http://info.abril.com.br/aberto/infonews/rssnews.xml" 'Aqui vai o endereço do arquivo RSS, ou do arquivo "gerador"' Criando Objeto XMLSet objXML = Server.CreateObject("msxml2.DOMDocument.3.0")objXML.async = falseobjXML.setProperty "ServerHTTPRequest", True' Não validar o arquivoobjXML.validateOnParse =false' true' Retirar espaçosobjXML.preserveWhiteSpace = falseblnLoaded = objXML.Load(url)If Not blnLoaded Then	Response.write "Nenhum notícia na fonte!"Else	set objNodeList = objXML.getElementsByTagName("channel")	For Each objNode In objNodeList	 	  	Next		Set objNodeList = objXML.getElementsByTagName("item")	For Each objNode In objNodeList		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 &"<tr><td><li/><b><a target=_blank href="& strURL &">"& strTitle &"</a></b>"		strTitle = ""		strURL = ""		strDescription = ""	Next	html = "<table>"& html &"</table>"	set objNodeList = NothingEnd if%><html><head><meta http-equiv="Content-Type" content="text/html; charset=windows-1252"></head><body><%response.write(html)%></body></html>

Compartilhar este post


Link para o post
Compartilhar em outros sites

×

Informação importante

Ao usar o fórum, você concorda com nossos Termos e condições.