He conseguido leer el xml con este código
Código ASP:
Ver original
Set objSrvHTTP = Server.CreateObject("MSXML2.ServerXMLHTTP.4.0") objSrvHTTP.open "GET", " http://www.dominio.com/temas/categoria/feed/", false objSrvHTTP.send() Feed = objSrvHTTP.ResponseText
Pero no se después como pasarle esa información al código que ya tengo que es el siguiente:
Código ASP:
Ver original
set objXml = server.CreateObject("MSXML2.DOMDocument") objxml.async = false ' Aqui cargamos el archivo en el objeto objxml.load(server.mappath("./tmp/xml_wm.xml")) ' Gestion de errores if objxml.parseError.errorCode <> 0 Then response.Write("Error de Lectura (Por favor, ponerse en contacto con el webmaster).<br />FilePos: " & objxml.parseError.filepos & "<br /> Línea: " & objxml.parseError.Line & "<br /> Causa: " & objxml.parseError.reason & "<br /> Ocurrió en: " & objxml.parseError.srcText & "<br /> Archivo: " & objxml.parseError.URL) response.End() end if numNoticias = objxml.selectSingleNode("/rss/channel").childNodes.length if numNoticias <= 5 then numnoticias = 0 else for n = 9 to 13 i=0 j=0 while j=0 if objxml.selectSingleNode("/rss/channel").childNodes(n).childNodes(i).tagname = "title" then response.write "titulo = " & objxml.selectSingleNode("/rss/channel").childNodes(n).childNodes(i).text j=1 end if i=i+1 wend i=0 j=0 while not j<>0 if objxml.selectSingleNode("/rss/channel").childNodes(n).childNodes(i).tagname = "link" then response.write "<br>enlace = " & objxml.selectSingleNode("/rss/channel").childNodes(n).childNodes(i).text j=1 end if i=i+1 wend i=0 j=0 while not j<>0 if objxml.selectSingleNode("/rss/channel").childNodes(n).childNodes(i).tagname = "description" then response.write "<br>Resumen = " & objxml.selectSingleNode("/rss/channel").childNodes(n).childNodes(i).text j=1 end if i=i+1 wend i=0 j=0 while not j<>0 if objxml.selectSingleNode("/rss/channel").childNodes(n).childNodes(i).tagname = "content:encoded" then response.write "<br><br>Total = " & objxml.selectSingleNode("/rss/channel").childNodes(n).childNodes(i).text j=1 end if i=i+1 wend response.write "<br><br>" next end if
He intentado también guardar el contenido de la variable feed en un archivo y guardarlo de forma temporal, pero si intento acceder a ese archivo después, me da un error por caracteres desconocidos.
Alguna idea de por donde tengo que tirar?
Salu2
